Lock: add session lock from power button and chandra-ctl lock
CI / test (push) Waiting to run

- Lock the session from the power button or `chandra-ctl lock`
- Unlock with a face or the password; the password always works
- Add compositor lock module with tests, and a polkit unlock policy (org.chandra.unlock)
- Document the lock flow in docs/lock.md and link it from the README
- Add generated interface bindings for the compositor and widget components
This commit is contained in:
nandi committed 2026-11-29 03:24:46 -08:00
1 parent 7501fc3ad9
commit c790f96e58
131 files changed
+4693 -274

No files matched your search

+12 -2
View File
@@ -168,6 +168,10 @@ pub(all) enum ShellAction {
Window(UInt64, WindowCommand)
/// The launcher's Reload reloaded the panel modules: the whole frame needs drawing again.
ModulesReloaded
/// The Keyboard panel module asked to show (true) or hide (false) the built-in OSK.
SetOskVisible(Bool)
/// The Rotate panel module asked to set display rotation (0..3).
SetRotation(Int)
} derive(Eq, Debug)
///| One wasm module loaded into the panel.
@@ -281,6 +285,10 @@ pub(all) struct DesktopShell {
/// What the screenshot module is told (the compositor sets it every frame): bit 0 a
/// recording is running, bit 1 recordings show the pointer.
mut screenshot_state : Int
/// Whether the built-in on-screen keyboard is currently visible (published to `osk`).
mut osk_visible : Bool
/// Current display rotation 0..3 (published to `rotation`).
mut rotation : Int
/// The network service (network.mbt), while a module imports `network`.
mut net : @network.NetService?
mut remember_windows : Bool
@@ -458,6 +466,8 @@ pub fn DesktopShell::new(display : String) -> DesktopShell {
bg_key: None,
restore_session: true,
screenshot_state: 2,
osk_visible: false,
rotation: 0,
net: None,
remember_windows: true,
native_auth_agent: true,
@@ -906,8 +916,8 @@ pub fn DesktopShell::pointer_down(self : DesktopShell, x : Int, y : Int) -> Bool
match self.widget_at(x, y) {
Some(w) => {
// A click (delivered on release) or the start of a drag that reorders the panel.
// The Interface Explorer toggle leaves open popups alone.
if !w.has_cap("inspector") {
// The Interface Explorer, Keyboard, and Rotate buttons leave open popups alone.
if !w.has_cap("inspector") && !w.has_cap("osk") && !w.has_cap("rotation") {
self.dismiss_popups(w.slot)
}
self.drag_slot = w.slot