Face unlock window steps aside while Apply asks for the password
CI / test (push) Canceled after 3m23s

After Apply the window kept the keyboard and the pointer and its dimmed card
covered the screen, so a password dialog that isn't Chandra's own (another
polkit agent's window) couldn't be reached. While Apply waits, the window now
shows only a note at the top and takes no input. A refused or cancelled
password brings it back with the snaps and marks kept (chandra-face camera
restarts the camera instead of exiting) and says so.

Test: snaps, Enter, the password dialog gets typing (Space no longer snaps
underneath) and the Authenticate click, then the root step finishes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf
This commit is contained in:
Claude committed 2026-11-26 04:05:11 +00:00
1 parent f2b2618104
commit 2c2ce3f913
8 files changed
+150 -8

No files matched your search

+18 -2
View File
@@ -58,8 +58,11 @@ fn ChandraCompositor::face_window_activate(self : ChandraCompositor, h : FaceHit
///| Input while the window is up: all of it goes to the window.
fn ChandraCompositor::face_window_input(self : ChandraCompositor, ev : @nested.InputEvent) -> Bool {
if self.shell.face.window is None {
return false
match self.shell.face.window {
// While Apply waits for the password the window steps aside: the password dialog (ours,
// or another agent's window) must get the keyboard and the pointer.
Some(w) if !w.applying => ()
_ => return false
}
match ev {
Key(code, pressed) => {
@@ -113,6 +116,19 @@ fn ChandraCompositor::face_window_ops(self : ChandraCompositor) -> Array[@scene.
}
}
let p = self.theme.palette
if win.applying {
// Out of the way of the password dialog: a note at the top, no dimming, no input.
self.face_hits.clear()
let fs = self.theme.font_size
let text = "Face unlock: " + win.message
let tw = @renderer.text_width(text, fs - 1, false, false) + 32
let r = @scene.Rect::new((self.output_w - tw) / 2, 12, tw, fs + 18)
let opaque = @scene.Rgba::new(p.surface_popup.r.to_int(), p.surface_popup.g.to_int(), p.surface_popup.b.to_int(), 255)
ops.push(@scene.DrawOp::FillRect(r, opaque, r.h / 2))
ops.push(@scene.DrawOp::StrokeRect(r, p.border, 1, r.h / 2))
ops.push(@scene.DrawOp::Text(r.x + tw / 2, r.y + r.h / 2, text, fs - 1, p.foreground, @scene.TextAlign::Center, false))
return ops
}
let (err_c, _) = auth_colors(p)
let fs = self.theme.font_size
let rad = self.theme.radius + 2