From b31baaf0cd33b0e4469e67a804d2686b13f41b7a Mon Sep 17 00:00:00 2001 From: Daniel Lipovetsky Date: Sun, 25 Jun 2023 10:34:10 -0700 Subject: [PATCH] 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 --- src/tabbox/tabbox.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tabbox/tabbox.cpp b/src/tabbox/tabbox.cpp index 2420eb743e..609d154b04 100644 --- a/src/tabbox/tabbox.cpp +++ b/src/tabbox/tabbox.cpp @@ -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; }