mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-09 04:32:51 +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
Notes:
sideshowbarker
2024-07-19 13:48:04 +09:00
Author: https://github.com/awesomekling
Commit: 51581c21fc
8 changed files with 47 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue