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
@@ -417,6 +417,16 @@ pub fn publish_screenshot(state : Int) -> Unit {
@hostpl.publish_screenshot(state.reinterpret_as_uint())
}
///| Publish whether the built-in on-screen keyboard is currently visible.
pub fn publish_osk(visible : Bool) -> Unit {
@hostpl.publish_osk(visible)
}
///| Publish the current display rotation (0=0, 1=90 CW, 2=180, 3=270 CW).
pub fn publish_rotation(rot : Int) -> Unit {
@hostpl.publish_rotation(rot.reinterpret_as_uint())
}
///| The power timeouts, in minutes (0: never).
pub fn publish_power(screen_off : Int, suspend : Int) -> Unit {
@hostpl.publish_power(screen_off.reinterpret_as_uint(), suspend.reinterpret_as_uint())
@@ -473,6 +483,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)
///|
@@ -502,6 +516,8 @@ pub fn next_request() -> HostRequest? {
Some(SetDesktop(i)) => Some(SetDesktop(i))
Some(FaceUnlock(i)) => Some(FaceUnlock(i))
Some(GameLibrary(r)) => Some(GameLibrary(r.action, r.game, r.mode))
Some(SetOskVisible(v)) => Some(SetOskVisible(v))
Some(SetRotation(r)) => Some(SetRotation(r))
}
}