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

+16
View File
@@ -831,6 +831,16 @@ pub fn publish_screenshot(state : Int) -> Unit {
c_host_set_int(4, state)
}
///| Publish whether the built-in on-screen keyboard is currently visible.
pub fn publish_osk(visible : Bool) -> Unit {
c_host_set_int(11, if visible { 1 } else { 0 })
}
///| Publish the current display rotation (0=0, 1=90 CW, 2=180, 3=270 CW).
pub fn publish_rotation(rot : Int) -> Unit {
c_host_set_int(12, rot)
}
///| Publish the power timeouts, in minutes (0: never).
pub fn publish_power(screen_off : Int, suspend : Int) -> Unit {
c_host_set_int(5, screen_off)
@@ -891,6 +901,10 @@ pub(all) enum HostRequest {
FaceUnlock(Int)
/// The game-library capability: 0 launch (game, mode), 1 stop, 2 focus (game), 3 refresh.
GameLibrary(Int, String, String)
/// The osk capability: show (true) or hide (false) the on-screen keyboard.
SetOskVisible(Bool)
/// The rotation capability: set display orientation (0..3).
SetRotation(Int)
} derive(Eq, Debug)
///|
@@ -933,6 +947,8 @@ pub fn next_request() -> HostRequest? {
18 => Some(Shortcut(c_host_req_int()))
19 => Some(DefaultApp(c_host_req_int()))
20 => Some(SetBrightness(c_host_req_int()))
21 => Some(SetOskVisible(c_host_req_int() != 0))
22 => Some(SetRotation(c_host_req_int()))
40 => Some(SetDesktop(c_host_req_int()))
44 => Some(FaceUnlock(c_host_req_int()))
45 => {