SUMMARY The issue started with KWin 6. On Wayland, it's working fine, but on X11, when trying to toggle the desktop grid using the same keyboard shortcut, it can't be closed. In order to close the grid, you have to select a desktop and left-click it. STEPS TO REPRODUCE 1. X11 session 2. Open grid using keyboard shortcut 3. Press shortcut again, trying to close the grid OBSERVED RESULT Grid stays open EXPECTED RESULT Grid should toggle using the same keyboard shortcut SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux KDE Plasma Version: 6.0.1 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2
Confirmed here. This affects both "Toggle Overview" and "Toggle Grid View", but not either of the Cycle functions. Taking a look at the code, I think I see a distinct difference in how they are handled: https://invent.kde.org/plasma/kwin/-/blob/master/src/plugins/overview/overvieweffect.cpp?ref_type=heads#L340 The cycle routines have their own specific handlers in this, like "cycle();", while the toggles use "m_gridState->toggleAction();" and same for overview. I tried testing with a quick and dirty "toggleGrid();" with similar functionality to cycle(); with one less state, no success yet.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5505
Tested the above merge request over 6.0.2, works for me!
Git commit c8e05680224e43a3d7487672bb882f2249eb92c0 by Vlad Zahorodnii, on behalf of Niccolò Venerandi. Committed on 27/03/2024 at 10:01. Pushed by vladz into branch 'master'. Fix oversights on shortcut handling within Overview/Grid effect M +3 -3 src/plugins/overview/overvieweffect.cpp https://invent.kde.org/plasma/kwin/-/commit/c8e05680224e43a3d7487672bb882f2249eb92c0
Git commit ee0dd6c8c5939bd40f2ff58681093eefce8ecc5a by Vlad Zahorodnii, on behalf of Niccolò Venerandi. Committed on 27/03/2024 at 10:26. Pushed by vladz into branch 'Plasma/6.0'. Fix oversights on shortcut handling within Overview/Grid effect (cherry picked from commit c8e05680224e43a3d7487672bb882f2249eb92c0) M +3 -3 src/plugins/overview/overvieweffect.cpp https://invent.kde.org/plasma/kwin/-/commit/ee0dd6c8c5939bd40f2ff58681093eefce8ecc5a
The issue seems to be back on 6.1.0. I just logged into an X11 session in order to check something because of a different bug report and noticed that the grid can't be closed again using the same shortcut. Working fine on Wayland.
Still working here on Wayland, FWIW.