On Fri Sep 8 12:02:46 2023 +0000, Alexandros Frantzis wrote:
Indeed it does, but this is an actual value I have seen on my system (with the `light` theme). It's not always that bad, although a quick test shows that the mean duration of `UXTHEME_ScrollBarDraw` is ~13ms with Wayland and ~10ms with X11, which is still a lot. FWIW, the majority of the time is spent drawing the top and bottom arrows of the scrollbar. There is certainly room for optimization here, but the timing of this particular scenario is just an example. Any frequency of motion events/messages that's higher than the message loop frequency will cause the loop to not become idle, and will lead to artifacts if sustained long enough (e.g., consider motion events every 2ms with a 3ms draw/loop period). I suspect we will have a similar problem with sustained resize events.
For this I think maybe GetMessage should be in charge of making sure surfaces are flushed often enough. Maybe just a matter of calling `flush_window_surfaces( FALSE )` unconditionally in `check_for_driver_events`, as it's throttled internally already.