mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
WindowServer: Support two window switcher modes: all or current desktop
When using the Super+Tab hotkey then all windows will be displayed, and we will switch to another virtual desktop if needed. When using the Alt+Tab hotkey then only the windows on the current desktop will be displayed.
This commit is contained in:
parent
7984c2836d
commit
6472ee0eff
4 changed files with 50 additions and 9 deletions
|
@ -1001,7 +1001,19 @@ void Compositor::recompute_occlusions()
|
|||
auto& wm = WindowManager::the();
|
||||
bool is_switcher_visible = wm.m_switcher.is_visible();
|
||||
wm.for_each_window_stack([&](WindowStack& window_stack) {
|
||||
window_stack.set_all_occluded(!is_switcher_visible);
|
||||
if (is_switcher_visible) {
|
||||
switch (wm.m_switcher.mode()) {
|
||||
case WindowSwitcher::Mode::ShowCurrentDesktop:
|
||||
window_stack.set_all_occluded(!(&window_stack == m_current_window_stack || &window_stack == m_transitioning_to_window_stack));
|
||||
break;
|
||||
case WindowSwitcher::Mode::ShowAllWindows:
|
||||
window_stack.set_all_occluded(false);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
window_stack.set_all_occluded(!(&window_stack == m_current_window_stack || &window_stack == m_transitioning_to_window_stack));
|
||||
}
|
||||
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
if (!is_switcher_visible) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue