Merge main: one linux-dmabuf, imported on the GPU or mapped without one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Opus 5.5 committed 2026-11-30 16:47:03 -08:00
commit d478f58d9b
54 files changed
+1110 -376

No files matched your search

+6
View File
@@ -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,
+13 -2
View File
@@ -14,8 +14,7 @@
///| Modules loaded into a fresh panel, in order. The dock (pinned and running apps, the task
/// manager) stretches, so what follows it packs right.
let default_panel : Array[String] = [
"launcher", "inspector", "layout", "dock", "moon-disc", "network", "clock-digital", "screenshot",
"session-settings",
"launcher", "inspector", "layout", "dock", "network", "clock-digital", "screenshot", "session-settings",
]
///| A fresh panel's modules: the defaults, plus the battery before the clock on a machine that
@@ -334,6 +333,9 @@ fn migrate_panel(entries : Array[String]) -> Array[String] {
if !has_settings && !out.contains("session-settings") {
out.push("session-settings")
}
} else if e == "moon-disc" {
// The moon phase disc never had source in the tree: a saved panel drops it.
continue
} else if e == "logout" {
if !has_launcher && !out.contains("launcher") {
out.push("launcher")
@@ -353,6 +355,11 @@ test "a saved panel's wallpaper button becomes the settings module" {
assert_eq(migrate_panel(["clock"]), ["clock"])
}
///|
test "a saved panel drops the moon-disc module, which has no source" {
assert_eq(migrate_panel(["launcher", "moon-disc", "clock-digital"]), ["launcher", "clock-digital"])
}
///|
test "a saved panel's task list and dock become one dock, in the task list's place" {
assert_eq(migrate_panel(["launcher", "tasks", "clock-digital", "dock"]), ["launcher", "dock", "clock-digital"])
@@ -855,6 +862,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 +1043,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)