Panel: add a Show Desktop module at the panel's end
- Clicking it hides every window, as Super+D does; it stays lit while the desktop is shown. - A second click brings the hidden windows back. - New show-desktop capability (wit toggle and publish-desktop-shown) for the wasm module. - Added to the default panel after session settings; existing panels are unchanged. - Test covers hiding, the lit state, and restoring the windows.
This commit is contained in:
1 parent
51852f0dac
commit
44bb77871d
31 files changed
+869
-49
No files matched your search
@@ -86,6 +86,14 @@ interface layout-control {
|
||||
set-layout: func(mode: u32);
|
||||
}
|
||||
|
||||
/// Show the desktop (Super+D): hide every window of the active workspace, and bring them back.
|
||||
interface show-desktop {
|
||||
/// True while the windows are hidden and `toggle` would bring them back.
|
||||
is-shown: func() -> bool;
|
||||
/// Hide the windows to show the desktop, or (while it is shown) bring back the ones it hid.
|
||||
toggle: func();
|
||||
}
|
||||
|
||||
/// The Interface Explorer: hover any system component to see its WIT.
|
||||
interface inspector {
|
||||
is-on: func() -> bool;
|
||||
|
||||
@@ -96,6 +96,8 @@ interface plasmoids {
|
||||
publish-osk: func(visible: bool);
|
||||
/// Current display orientation (0 = 0°, 1 = 90° CW, 2 = 180°, 3 = 270° CW).
|
||||
publish-rotation: func(rot: u32);
|
||||
/// Whether show-desktop has the windows hidden (a toggle would bring them back).
|
||||
publish-desktop-shown: func(shown: bool);
|
||||
|
||||
record system-snapshot {
|
||||
cpu-permille: u32,
|
||||
@@ -189,6 +191,8 @@ interface plasmoids {
|
||||
set-osk-visible(bool),
|
||||
/// The rotation capability: set display orientation (0..3).
|
||||
set-rotation(s32),
|
||||
/// The show-desktop capability's `toggle`: hide the windows, or bring them back.
|
||||
toggle-desktop,
|
||||
}
|
||||
/// The next pending request, oldest first.
|
||||
next-request: func() -> option<request>;
|
||||
|
||||
@@ -106,6 +106,7 @@ world plasmoid-host {
|
||||
import game-library;
|
||||
import osk;
|
||||
import rotation;
|
||||
import show-desktop;
|
||||
export plasmoid;
|
||||
}
|
||||
|
||||
@@ -187,6 +188,12 @@ world osk-widget {
|
||||
import osk;
|
||||
}
|
||||
|
||||
/// Show Desktop button: hides the windows, a second click brings them back.
|
||||
world show-desktop-widget {
|
||||
include widget;
|
||||
import show-desktop;
|
||||
}
|
||||
|
||||
/// Display rotation button ("Rot"): rotates 90° clockwise on click.
|
||||
world rotate-widget {
|
||||
include widget;
|
||||
|
||||
Reference in new issue
Block a user