WindowServer: Don't allow minimize/maximize of windows while modal up

While one window is blocked by another modal one, just ignore events on
the window frame, and also ignore set_minimized() and set_maximized().

The only thing you're allowed to do with a blocked window is moving it.

Fixes #1111.
This commit is contained in:
Andreas Kling
2020-01-25 10:39:09 +01:00
parent 6df81c8a88
commit b648997d1f
2 changed files with 7 additions and 0 deletions

View File

@@ -153,6 +153,8 @@ void WSWindow::set_minimized(bool minimized)
return;
if (minimized && !m_minimizable)
return;
if (is_blocked_by_modal_window())
return;
m_minimized = minimized;
update_menu_item_text(PopupMenuItem::Minimize);
start_minimize_animation();
@@ -193,6 +195,8 @@ void WSWindow::set_maximized(bool maximized)
return;
if (maximized && !is_resizable())
return;
if (is_blocked_by_modal_window())
return;
set_tiled(WindowTileType::None);
m_maximized = maximized;
update_menu_item_text(PopupMenuItem::Maximize);