mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
WindowServer+LibGUI: Mark window bitmaps volatile in occluded windows
WindowServer now tracks whether windows are occluded (meaning that they are completely covered by one or more opaque windows sitting above them.) This state is communicated to the windows via WindowStateChanged messages, which then allow GWindow to mark its backing store volatile. This reduces the effective memory impact of windows that are not at all visible to the user. Very cool. :^)
This commit is contained in:
@@ -299,5 +299,5 @@ void GWindowServerConnection::handle(const WindowClient::DragCancelled&)
|
||||
void GWindowServerConnection::handle(const WindowClient::WindowStateChanged& message)
|
||||
{
|
||||
if (auto* window = GWindow::from_window_id(message.window_id()))
|
||||
window->notify_state_changed({}, message.minimized());
|
||||
window->notify_state_changed({}, message.minimized(), message.occluded());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user