tabbox: Show window switcher only when there are two or more windows

Previously, we showed the window switcher even if there was only one
window, or no windows.

Now, we show the window switcher only if there are two or more windows.
Note that "desktop" counts as a window when the switcher's "show desktop
mode" is enabled.

BUG: 370396
BUG: 419408
This commit is contained in:
Daniel Lipovetsky 2023-06-25 10:34:10 -07:00 committed by Nate Graham
parent a02f09250d
commit b31baaf0cd

View file

@ -889,6 +889,13 @@ bool TabBox::startKDEWalkThroughWindows(TabBoxMode mode)
m_noModifierGrab = false;
setMode(mode);
reset();
// Show the switcher only when there are two or more clients.
if (m_tabBox->clientList().size() <= 1) {
close();
return false;
}
return true;
}