Lock: add session lock from power button and chandra-ctl lock
CI / test (push) Failing after 52s

- 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

+30
View File
@@ -278,3 +278,33 @@ test "moon and digital clock modules render from the clock capability" {
assert_true(ts[0].has_suffix("AM") || ts[0].has_suffix("PM")) // 12-hour by default
c.unload()
}
///|
test "osk module toggles through the osk capability" {
let p = load_module("osk")
assert_true(p.imports().contains("osk"))
publish_osk(false)
assert_true(texts_of(p.render(44, 34, test_tokens())).contains("KB"))
assert_true(p.popup() is None)
assert_true(p.on_event(false, PointerDown(5, 5)))
assert_eq(drain(), [SetOskVisible(true)])
publish_osk(true)
assert_true(p.on_event(false, PointerDown(5, 5)))
assert_eq(drain(), [SetOskVisible(false)])
p.unload()
}
///|
test "rotate module cycles orientation through the rotation capability" {
let p = load_module("rotate")
assert_true(p.imports().contains("rotation"))
publish_rotation(0)
assert_true(texts_of(p.render(44, 34, test_tokens())).contains("Rot"))
assert_true(p.popup() is None)
assert_true(p.on_event(false, PointerDown(5, 5)))
assert_eq(drain(), [SetRotation(1)])
publish_rotation(3)
assert_true(p.on_event(false, PointerDown(5, 5)))
assert_eq(drain(), [SetRotation(0)])
p.unload()
}