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:
Andreas Kling 2019-06-01 20:10:37 +02:00
parent 8d7fbbe1fb
commit 51581c21fc
Notes: sideshowbarker 2024-07-19 13:48:04 +09:00
8 changed files with 47 additions and 0 deletions

View file

@ -49,6 +49,17 @@ void GWindow::close()
delete_later();
}
void GWindow::move_to_front()
{
if (!m_window_id)
return;
WSAPI_ClientMessage request;
request.type = WSAPI_ClientMessage::Type::MoveWindowToFront;
request.window_id = m_window_id;
GEventLoop::post_message_to_server(request);
}
void GWindow::show()
{
if (m_window_id)