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
@@ -855,6 +855,9 @@ fn DesktopShell::publish_host_data(self : DesktopShell) -> Unit {
|
||||
if self.any_cap("rotation") {
|
||||
@wasm.publish_rotation(self.rotation)
|
||||
}
|
||||
if self.any_cap("show-desktop") {
|
||||
@wasm.publish_desktop_shown(self.desktop_shown)
|
||||
}
|
||||
if self.any_cap("battery") {
|
||||
let b = self.battery.refresh()
|
||||
@wasm.publish_battery(b.percent, b.state, b.secs_left)
|
||||
@@ -1033,6 +1036,7 @@ fn DesktopShell::process_requests(self : DesktopShell) -> Unit {
|
||||
Some(GameLibrary(code, game, mode)) => self.gamelib.request(code, game, mode)
|
||||
Some(SetOskVisible(v)) => self.actions.push(SetOskVisible(v))
|
||||
Some(SetRotation(r)) => self.actions.push(SetRotation(r))
|
||||
Some(ToggleDesktop) => self.actions.push(ToggleDesktop)
|
||||
Some(PowerAction(a)) => if a >= 0 && a <= 2 { self.actions.push(SystemPower(a)) }
|
||||
Some(Network(code, ssid, password)) => self.network_request(code, ssid, password)
|
||||
Some(SetInspector(on)) => self.set_inspecting(on)
|
||||
|
||||
Reference in new issue
Block a user