mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00: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
Notes:
sideshowbarker
2024-07-19 03:54:19 +09:00
Author: https://github.com/tomuta Commit: https://github.com/SerenityOS/serenity/commit/8ffa4131ce1 Pull-request: https://github.com/SerenityOS/serenity/pull/3079 Issue: https://github.com/SerenityOS/serenity/issues/3074
1 changed files with 3 additions and 2 deletions
|
@ -1426,8 +1426,9 @@ 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) {
|
||||
w.set_maximized(maximized);
|
||||
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