mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
WindowServer: Find parent taskbar rect for minimize animation
If a modal window is being minimized, it may not have its own taskbar rectangle. In that case, try finding a parent in the modal window stack that does have one, and use that for the animation.
This commit is contained in:
parent
e035640cd5
commit
2552e3be00
Notes:
sideshowbarker
2024-07-19 03:25:42 +09:00
Author: https://github.com/tomuta
Commit: 2552e3be00
Pull-request: https://github.com/SerenityOS/serenity/pull/3209
4 changed files with 43 additions and 7 deletions
|
@ -228,6 +228,7 @@ void WindowManager::move_to_front_and_make_active(Window& window)
|
|||
// active input from any accessory window)
|
||||
for_each_window_in_modal_stack(window, [&](auto& w, bool is_stack_top) {
|
||||
move_window_to_front(w, is_stack_top, is_stack_top);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
|
||||
Compositor::the().invalidate_occlusions();
|
||||
|
@ -1416,6 +1417,7 @@ void WindowManager::minimize_windows(Window& window, bool minimized)
|
|||
{
|
||||
for_each_window_in_modal_stack(window, [&](auto& w, bool) {
|
||||
w.set_minimized(minimized);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1426,6 +1428,7 @@ void WindowManager::maximize_windows(Window& window, bool maximized)
|
|||
w.set_maximized(maximized);
|
||||
if (w.is_minimized())
|
||||
w.set_minimized(false);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue