Bug 482931 - X11: desktop grid can't be closed using the same keyboard shortcut
Summary: X11: desktop grid can't be closed using the same keyboard shortcut
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-overview (show other bugs)
Version: 6.0.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-08 23:36 UTC by bastimeyer123
Modified: 2024-06-26 19:56 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.4
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bastimeyer123 2024-03-08 23:36:28 UTC
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
Comment 1 Blazer Silving 2024-03-10 10:12:44 UTC
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.
Comment 2 Bug Janitor Service 2024-03-22 08:18:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5505
Comment 3 Blazer Silving 2024-03-22 08:25:57 UTC
Tested the above merge request over 6.0.2, works for me!
Comment 4 Vlad Zahorodnii 2024-03-27 10:10:04 UTC
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
Comment 5 Vlad Zahorodnii 2024-03-27 10:42:03 UTC
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
Comment 6 bastimeyer123 2024-06-23 01:24:55 UTC
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.
Comment 7 Nate Graham 2024-06-26 19:56:40 UTC
Still working here on Wayland, FWIW.