1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:27:35 +00:00

WindowServer: Don't send paint events to occluded windows

We wouldn't be able to see what they paint anyway, and nobody should
be using paint events to drive program logic.
This commit is contained in:
Andreas Kling 2019-12-27 11:40:29 +01:00
parent c7847d7c81
commit 74968f0ec1

View file

@ -436,7 +436,7 @@ OwnPtr<WindowServer::DestroyWindowResponse> WSClientConnection::handle(const Win
void WSClientConnection::post_paint_message(WSWindow& window)
{
auto rect_set = window.take_pending_paint_rects();
if (window.is_minimized())
if (window.is_minimized() || window.is_occluded())
return;
Vector<Rect> rects;