1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:37:43 +00:00

WindowServer: Don't let modals minimize themselves

But do allow them to remain minimizable by a parent. This is a nice
ergonomics fix to allow a parent window to quickly minimize and
restore all its modal children.
This commit is contained in:
thankyouverycool 2022-08-22 14:17:58 -04:00 committed by Andreas Kling
parent 788b16cbf8
commit 2b2c317c2d
3 changed files with 4 additions and 4 deletions

View file

@ -228,7 +228,7 @@ void Window::update_window_menu_items()
return;
m_window_menu_minimize_item->set_text(m_minimized_state != WindowMinimizedState::None ? "&Unminimize" : "Mi&nimize");
m_window_menu_minimize_item->set_enabled(m_minimizable);
m_window_menu_minimize_item->set_enabled(m_minimizable && !is_modal());
m_window_menu_maximize_item->set_text(is_maximized() ? "&Restore" : "Ma&ximize");
m_window_menu_maximize_item->set_enabled(m_resizable);