mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
WindowServer+LibGUI: Notify windows when their maximized state changes
Previously, GUI::Window::is_maximized() had to make a synchronous IPC request to WindowServer in order to find out if the window was indeed maximized. This patch removes the need for synchronous IPC by instead pushing the maximization state to clients when it changes. The motivation for this change was that GUI::Statusbar was checking if the containing window was maximized in its resize_event(), causing all windows with a statusbar to block on sync IPC *during* resize. Browser would typically block for ~15 milliseconds here every time on my machine, continuously during live resize.
This commit is contained in:
parent
463dc91049
commit
1a38ab0ca1
7 changed files with 16 additions and 20 deletions
|
@ -372,10 +372,10 @@ void ConnectionToWindowServer::drag_cancelled()
|
|||
Application::the()->notify_drag_cancelled({});
|
||||
}
|
||||
|
||||
void ConnectionToWindowServer::window_state_changed(i32 window_id, bool minimized, bool occluded)
|
||||
void ConnectionToWindowServer::window_state_changed(i32 window_id, bool minimized, bool maximized, bool occluded)
|
||||
{
|
||||
if (auto* window = Window::from_window_id(window_id))
|
||||
window->notify_state_changed({}, minimized, occluded);
|
||||
window->notify_state_changed({}, minimized, maximized, occluded);
|
||||
}
|
||||
|
||||
void ConnectionToWindowServer::display_link_notification()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue