mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
WindowServer+LibGUI: Add a way to bring a window to the front.
GWindow::move_to_front() can now be used to move a window to the top of the window stack. We use this in Terminal to bring the settings window to the front if it already exists when it's requested, in case it's hiding behind something.
This commit is contained in:
parent
8d7fbbe1fb
commit
51581c21fc
8 changed files with 47 additions and 0 deletions
|
@ -64,6 +64,7 @@ public:
|
|||
APIGetWallpaperRequest,
|
||||
APISetWindowOverrideCursorRequest,
|
||||
APISetWindowHasAlphaChannelRequest,
|
||||
APIMoveWindowToFrontRequest,
|
||||
WMAPISetActiveWindowRequest,
|
||||
WMAPISetWindowMinimizedRequest,
|
||||
WMAPIStartWindowResizeRequest,
|
||||
|
@ -460,6 +461,20 @@ private:
|
|||
int m_window_id { 0 };
|
||||
};
|
||||
|
||||
class WSAPIMoveWindowToFrontRequest final : public WSAPIClientRequest {
|
||||
public:
|
||||
explicit WSAPIMoveWindowToFrontRequest(int client_id, int window_id)
|
||||
: WSAPIClientRequest(WSEvent::APIMoveWindowToFrontRequest, client_id)
|
||||
, m_window_id(window_id)
|
||||
{
|
||||
}
|
||||
|
||||
int window_id() const { return m_window_id; }
|
||||
|
||||
private:
|
||||
int m_window_id { 0 };
|
||||
};
|
||||
|
||||
class WSAPISetClipboardContentsRequest final : public WSAPIClientRequest {
|
||||
public:
|
||||
explicit WSAPISetClipboardContentsRequest(int client_id, int shared_buffer_id, int size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue