mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +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:
@@ -1567,8 +1567,12 @@ void WindowManager::process_key_event(KeyEvent& event)
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.type() == Event::KeyDown && ((event.modifiers() == Mod_Super && event.key() == Key_Tab) || (event.modifiers() == (Mod_Super | Mod_Shift) && event.key() == Key_Tab)))
|
||||
m_switcher.show();
|
||||
if (event.type() == Event::KeyDown) {
|
||||
if ((event.modifiers() == Mod_Super && event.key() == Key_Tab) || (event.modifiers() == (Mod_Super | Mod_Shift) && event.key() == Key_Tab))
|
||||
m_switcher.show(WindowSwitcher::Mode::ShowAllWindows);
|
||||
else if ((event.modifiers() == Mod_Alt && event.key() == Key_Tab) || (event.modifiers() == (Mod_Alt | Mod_Shift) && event.key() == Key_Tab))
|
||||
m_switcher.show(WindowSwitcher::Mode::ShowCurrentDesktop);
|
||||
}
|
||||
if (m_switcher.is_visible()) {
|
||||
m_switcher.on_key_event(event);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user