Kiosk: --kiosk-hybrid keeps the desktop and locks only leaving the session
CI / test (push) Successful in 3m49s

Panel, launcher, dock, desktop module and shortcuts stay; Log out and power
actions are refused while locked. Admin escape and chandra-ctl kiosk work as
in the strict kiosk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgvjzw8hHirxRsXSsE
This commit is contained in:
Claude committed 2026-11-26 02:38:02 +00:00
1 parent f0c39757d7
commit b4f7149c72
7 files changed
+115 -15

No files matched your search

+8 -5
View File
@@ -346,7 +346,7 @@ pub fn ChandraCompositor::resize(self : ChandraCompositor, w : Int, h : Int) ->
}
self.output_w = w
self.output_h = h
self.work_area = work_area_for(w, h, self.theme, kiosk=self.kiosk_locked())
self.work_area = work_area_for(w, h, self.theme, kiosk=self.kiosk_strict())
self.close_overlay() // its frozen frame is the old size
self.stop_recording()
self.server.set_output_size(w, h)
@@ -1397,6 +1397,9 @@ pub fn ChandraCompositor::apply_theme(self : ChandraCompositor) -> Unit {
///| Carry out what panel modules asked for: focus a window, switch layout.
fn ChandraCompositor::run_shell_actions(self : ChandraCompositor) -> Unit {
for a in self.shell.take_actions() {
if self.kiosk_refuses(a) {
continue
}
match a {
@shell.ShellAction::FocusWindow(wid) => self.activate_task(wid)
@shell.ShellAction::Logout => self.quit_requested = true
@@ -1734,11 +1737,11 @@ pub fn ChandraCompositor::handle_input(
return
}
// Right button over a swappable panel widget opens its alternatives menu.
if button == 273U && pressed && !self.kiosk_locked() && self.shell.right_click(xi, yi) {
if button == 273U && pressed && !self.kiosk_strict() && self.shell.right_click(xi, yi) {
return
}
// Right button on the empty desktop: the desktop menu (module settings, system settings).
if button == 273U && pressed && !self.kiosk_locked() && self.window_at(xi, yi) is None &&
if button == 273U && pressed && !self.kiosk_strict() && self.window_at(xi, yi) is None &&
!self.shell.hit(xi, yi) && self.shell.desktop_menu(xi, yi) {
return
}
@@ -1817,9 +1820,9 @@ pub fn ChandraCompositor::handle_input(
self.super_solo = false
} else if self.switcher_key(code, pressed, time_ms) {
self.super_solo = false
} else if !self.kiosk_locked() && self.shortcut_key(code, pressed) {
} else if !self.kiosk_strict() && self.shortcut_key(code, pressed) {
self.super_solo = false
} else if self.kiosk_locked() && (code == 125U || code == 126U) {
} else if self.kiosk_strict() && (code == 125U || code == 126U) {
// A locked kiosk: Super opens nothing and isn't passed on either.
self.super_solo = false
} else if code == 125U || code == 126U {