mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
LibGUI+WindowServer: Allow programatically minimizing windows
The backend methods in WindowServer already exist. This just adds the IPC plumbing to connect those methods to GUI::Window.
This commit is contained in:
parent
89b2ff72f7
commit
0d5209cee6
Notes:
sideshowbarker
2024-07-17 09:49:33 +09:00
Author: https://github.com/trflynn89
Commit: 0d5209cee6
Pull-request: https://github.com/SerenityOS/serenity/pull/15888
Reviewed-by: https://github.com/Lubrsi
Reviewed-by: https://github.com/linusg ✅
5 changed files with 41 additions and 0 deletions
|
@ -1036,6 +1036,18 @@ void Window::set_maximized(bool maximized)
|
|||
ConnectionToWindowServer::the().async_set_maximized(m_window_id, maximized);
|
||||
}
|
||||
|
||||
void Window::set_minimized(bool minimized)
|
||||
{
|
||||
if (!is_minimizable())
|
||||
return;
|
||||
|
||||
m_minimized = minimized;
|
||||
if (!is_visible())
|
||||
return;
|
||||
|
||||
ConnectionToWindowServer::the().async_set_minimized(m_window_id, minimized);
|
||||
}
|
||||
|
||||
void Window::update_min_size()
|
||||
{
|
||||
if (main_widget()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue