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
@@ -172,6 +172,8 @@ pub(all) enum ShellAction {
|
||||
SetOskVisible(Bool)
|
||||
/// The Rotate panel module asked to set display rotation (0..3).
|
||||
SetRotation(Int)
|
||||
/// The Show Desktop module was clicked: hide the windows, or bring them back (as Super+D).
|
||||
ToggleDesktop
|
||||
} derive(Eq, Debug)
|
||||
|
||||
///| One wasm module loaded into the panel.
|
||||
@@ -289,6 +291,9 @@ pub(all) struct DesktopShell {
|
||||
mut osk_visible : Bool
|
||||
/// Current display rotation 0..3 (published to `rotation`).
|
||||
mut rotation : Int
|
||||
/// What the Show Desktop module is told (the compositor sets it every frame): the windows are
|
||||
/// hidden and another toggle would bring them back.
|
||||
mut desktop_shown : Bool
|
||||
/// The network service (network.mbt), while a module imports `network`.
|
||||
mut net : @network.NetService?
|
||||
mut remember_windows : Bool
|
||||
@@ -468,6 +473,7 @@ pub fn DesktopShell::new(display : String) -> DesktopShell {
|
||||
screenshot_state: 2,
|
||||
osk_visible: false,
|
||||
rotation: 0,
|
||||
desktop_shown: false,
|
||||
net: None,
|
||||
remember_windows: true,
|
||||
native_auth_agent: true,
|
||||
|
||||
Reference in new issue
Block a user