1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 19:35:08 +00:00

WindowServer: Don't spam clients with resize events.

Wait for them to finish a paint, then send them a new resize event.
The exception is when releasing the mouse button to end the resize.
Then we send a new resize event right away.
This commit is contained in:
Andreas Kling 2019-02-20 15:50:05 +01:00
parent 59b8183c4b
commit d054fbee91
3 changed files with 10 additions and 2 deletions

View file

@ -358,6 +358,7 @@ void WSClientConnection::handle_request(WSAPIDidFinishPaintingNotification& requ
return;
}
auto& window = *(*it).value;
window.set_has_painted_since_last_resize(true);
WSWindowManager::the().invalidate(window, request.rect());
}