1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:37:35 +00:00

WindowServer+LibGUI: Allow switching windows in/out of fullscreen mode

You can now call GWindow::set_fullscreen(bool) and it will go in or out
of fullscreen mode.

WindowServer will also remember the previous window rect when switching
to fullscreen, and restore it when switching back. :^)
This commit is contained in:
Andreas Kling 2019-09-16 18:38:42 +02:00
parent a34f3a3729
commit d92e26d023
8 changed files with 78 additions and 1 deletions

View file

@ -38,6 +38,7 @@ public:
void set_maximized(bool);
bool is_fullscreen() const { return m_fullscreen; }
void set_fullscreen(bool);
bool show_titlebar() const { return m_show_titlebar; }
void set_show_titlebar(bool show) { m_show_titlebar = show; }
@ -155,6 +156,7 @@ private:
WSClientConnection* m_client { nullptr };
String m_title;
Rect m_rect;
Rect m_saved_nonfullscreen_rect;
WSWindowType m_type { WSWindowType::Normal };
bool m_global_cursor_tracking_enabled { false };
bool m_automatic_cursor_tracking_enabled { false };