mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:47:45 +00:00
WindowServer: Recompute window occlusions on window stack changes
When adding/removing windows, or moving a window from the front to the back, we have to recompute everyone's occlusion states.
This commit is contained in:
parent
74968f0ec1
commit
fd06164fa0
1 changed files with 6 additions and 0 deletions
|
@ -312,6 +312,8 @@ void WSWindowManager::add_window(WSWindow& window)
|
|||
if (m_switcher.is_visible() && window.type() != WSWindowType::WindowSwitcher)
|
||||
m_switcher.refresh();
|
||||
|
||||
recompute_occlusions();
|
||||
|
||||
if (window.listens_to_wm_events()) {
|
||||
for_each_window([&](WSWindow& other_window) {
|
||||
if (&window != &other_window) {
|
||||
|
@ -335,6 +337,8 @@ void WSWindowManager::move_to_front_and_make_active(WSWindow& window)
|
|||
m_windows_in_order.remove(&window);
|
||||
m_windows_in_order.append(&window);
|
||||
|
||||
recompute_occlusions();
|
||||
|
||||
set_active_window(&window);
|
||||
}
|
||||
|
||||
|
@ -347,6 +351,8 @@ void WSWindowManager::remove_window(WSWindow& window)
|
|||
if (m_switcher.is_visible() && window.type() != WSWindowType::WindowSwitcher)
|
||||
m_switcher.refresh();
|
||||
|
||||
recompute_occlusions();
|
||||
|
||||
for_each_window_listening_to_wm_events([&window](WSWindow& listener) {
|
||||
if (!(listener.wm_event_mask() & WSWMEventMask::WindowRemovals))
|
||||
return IterationDecision::Continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue