Open Mehuge opened 8 years ago
I wonder if the UI layer is being bombarded with resize events or something.
Actually doing a bit more testing, with a breakpoint in the onresize logic inside HUD. If I resize the window by a small amount, at the end of the resize I get 1 resize event and everything is fine.
If I resize by a large amount I don't get the breakpoint (not right away) the UI is scaled on screen and becomes unresponsive, about a minute later, the UI wakes up and I hit the resize breakpoint.
Not sure if it is to the amount of resize or just randomly hangs at this point.
This should be resolved now right?
No, it is still an issue (just tested it on hatchery).
Open Hatchery Wait for UI to load. Grab right edge of client window and drag sideways (note UI stretches) Let go (note UI still stretched not resized)
Now try and interact with chat. Can't do anything with any UI. Eventually after some minutes, the resize event is received by the UI layer, and everything wakes up.
I suspect this is a client.exe or CEF issue, not an issue in any UI code.
Using the HUD UI as the example as that is the current direction.
When the client is maximised, unmaximised or minimised, the client triggers (intentionally or otherwise) a window.onresize event to the UI, which can then pick up the new window size and act upon it.
However, if you instead grab the edge of the window, and resize it that way, the client scales the UI on screen (distorting aspect ratio in the process) instead of sending a window.onresize event. Indeed, after doing this, even maximise etc, no longer send resize events to the UI, instead scaling the UI.
I notice also localhost:8088 has become unresponsive, as if the UI has infact crashed, also sometimes the UI will update, perhaps it is more a case of the UI becomes unresponsive on resize (so it takes ages for the resize event to be processed) rather than it breaking all together.