mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-10 13:17:36 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user