mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +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
|
@ -39,7 +39,7 @@ public:
|
|||
bool is_fullscreen() const { return m_fullscreen; }
|
||||
void set_fullscreen(bool);
|
||||
|
||||
bool is_maximized() const;
|
||||
bool is_maximized() const { return m_maximized; }
|
||||
void set_maximized(bool);
|
||||
|
||||
bool is_frameless() const { return m_frameless; }
|
||||
|
@ -192,7 +192,7 @@ public:
|
|||
|
||||
static void for_each_window(Badge<ConnectionToWindowServer>, Function<void(Window&)>);
|
||||
static void update_all_windows(Badge<ConnectionToWindowServer>);
|
||||
void notify_state_changed(Badge<ConnectionToWindowServer>, bool minimized, bool occluded);
|
||||
void notify_state_changed(Badge<ConnectionToWindowServer>, bool minimized, bool maximized, bool occluded);
|
||||
|
||||
virtual bool is_visible_for_timer_purposes() const override { return m_visible_for_timer_purposes; }
|
||||
|
||||
|
@ -290,7 +290,7 @@ private:
|
|||
Optional<Gfx::IntSize> m_resize_aspect_ratio {};
|
||||
bool m_minimizable { true };
|
||||
bool m_closeable { true };
|
||||
bool m_maximized_when_windowless { false };
|
||||
bool m_maximized { false };
|
||||
bool m_fullscreen { false };
|
||||
bool m_frameless { false };
|
||||
bool m_forced_shadow { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue