mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
WindowServer: Limit maximizing windows to top window in modal stack
When maximizing a window that is blocked by a modal window, only maximize the top window in the stack. However, if the stack is minimized, restore all of them in addition. Fixes #3074
This commit is contained in:
parent
37d5e3e0df
commit
8ffa4131ce
1 changed files with 3 additions and 2 deletions
|
@ -1426,7 +1426,8 @@ void WindowManager::minimize_windows(Window& window, bool minimized)
|
|||
|
||||
void WindowManager::maximize_windows(Window& window, bool maximized)
|
||||
{
|
||||
for_each_window_in_modal_stack(window, [&](auto& w, bool) {
|
||||
for_each_window_in_modal_stack(window, [&](auto& w, bool stack_top) {
|
||||
if (stack_top)
|
||||
w.set_maximized(maximized);
|
||||
if (w.is_minimized())
|
||||
w.set_minimized(false);
|
||||
|
|
Loading…
Reference in a new issue