Super+D shows the desktop: minimize every window, again to bring them back

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hktZQ73WicBDmBgP57
This commit is contained in:
Claude authored and V committed 2026-11-25 17:07:33 +00:00
1 parent 11d7e4d276
commit 0f4c84b966
3 files changed
+154

No files matched your search

+10
View File
@@ -50,6 +50,11 @@ pub(all) struct MoonPlasmaCompositor {
mut mods : UInt
/// A Super key is down and nothing else was pressed since: releasing it opens the launcher.
mut super_solo : Bool
/// Super+D (showdesktop.mbt): whether a Super key is held, whether the D press was swallowed,
/// and the windows it minimized (bottom to top) so a second Super+D can restore them.
mut super_down : Bool
mut d_swallowed : Bool
mut desktop_hidden : Array[UInt64]
mut layout_mode : @wm.LayoutMode
/// Set when the user asked to end the session (the logout button); the main loop then exits.
mut quit_requested : Bool
@@ -113,6 +118,9 @@ pub fn MoonPlasmaCompositor::new(
kbd_win: None,
mods: 0U,
super_solo: false,
super_down: false,
d_swallowed: false,
desktop_hidden: [],
layout_mode: @wm.LayoutMode::Tiling,
quit_requested: false,
switcher_on: false,
@@ -1232,6 +1240,8 @@ pub fn MoonPlasmaCompositor::handle_input(
Key(code, pressed) =>
if self.switcher_key(code, pressed, time_ms) {
self.super_solo = false
} else if self.show_desktop_key(code, pressed) {
self.super_solo = false
} else if code == 125U || code == 126U {
// Super (left/right): a bare tap toggles the launcher search; never reaches clients.
if pressed {