mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 22:47:45 +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:
parent
a34f3a3729
commit
d92e26d023
8 changed files with 78 additions and 1 deletions
|
@ -65,6 +65,7 @@ public:
|
|||
APISetWindowOverrideCursorRequest,
|
||||
APISetWindowHasAlphaChannelRequest,
|
||||
APIMoveWindowToFrontRequest,
|
||||
APISetFullscreenRequest,
|
||||
WMAPISetActiveWindowRequest,
|
||||
WMAPISetWindowMinimizedRequest,
|
||||
WMAPIStartWindowResizeRequest,
|
||||
|
@ -502,6 +503,23 @@ private:
|
|||
int m_window_id { 0 };
|
||||
};
|
||||
|
||||
class WSAPISetFullscreenRequest final : public WSAPIClientRequest {
|
||||
public:
|
||||
explicit WSAPISetFullscreenRequest(int client_id, int window_id, bool fullscreen)
|
||||
: WSAPIClientRequest(WSEvent::APISetFullscreenRequest, client_id)
|
||||
, m_window_id(window_id)
|
||||
, m_fullscreen(fullscreen)
|
||||
{
|
||||
}
|
||||
|
||||
int window_id() const { return m_window_id; }
|
||||
bool fullscreen() const { return m_fullscreen; }
|
||||
|
||||
private:
|
||||
int m_window_id { 0 };
|
||||
bool m_fullscreen;
|
||||
};
|
||||
|
||||
class WSAPISetClipboardContentsRequest final : public WSAPIClientRequest {
|
||||
public:
|
||||
explicit WSAPISetClipboardContentsRequest(int client_id, int shared_buffer_id, int size, const String& data_type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue