chore: drop unlock diagnostic instrumentation (v0.6.16)

The per-unlock window-state dump was scaffolding to prove the stale-window
hypothesis behind v0.6.15. With the fix in place, normal logging covers
validation: the prune handler already logs on monitor removal, and
coredumpctl shows whether the crash recurs. Remove the diagnostic block
and its all_handles_dbg clone; restore all_handles to its original spot.
This commit is contained in:
2026-06-02 17:05:34 +02:00
parent 492a781d92
commit 215ab0a984
3 changed files with 6 additions and 23 deletions
+4 -21
View File
@@ -72,39 +72,18 @@ fn activate_with_session_lock(
.and_then(|path| lockscreen::load_background_texture(&path)),
);
// Shared handles list — populated by connect_monitor, read by fingerprint init.
// Declared before unlock_callback so the callback can inspect window state on unlock.
let all_handles: Rc<RefCell<Vec<lockscreen::LockscreenHandles>>> =
Rc::new(RefCell::new(Vec::new()));
// Shared unlock callback — unlocks session and quits.
// Guard prevents double-unlock if PAM and fingerprint succeed simultaneously.
let lock_clone = lock.clone();
let app_clone = app.clone();
let already_unlocked = Rc::new(Cell::new(false));
let au = already_unlocked.clone();
let all_handles_dbg = all_handles.clone();
let unlock_callback: Rc<dyn Fn()> = Rc::new(move || {
if au.get() {
log::debug!("Unlock already triggered, ignoring duplicate");
return;
}
au.set(true);
// DIAGNOSTIC: log lock-window state at unlock to confirm whether a stale
// window (unrealized / dead surface) remains in all_handles after a monitor
// power-off/resume. Remove once the resume-unlock crash is fixed.
{
let handles = all_handles_dbg.borrow();
log::info!("UNLOCK: {} window(s) in all_handles", handles.len());
for (i, h) in handles.iter().enumerate() {
log::info!(
"UNLOCK: window[{i}] realized={} mapped={} visible={}",
h.window.is_realized(),
h.window.is_mapped(),
h.window.is_visible(),
);
}
}
lock_clone.unlock();
app_clone.quit();
});
@@ -116,6 +95,10 @@ fn activate_with_session_lock(
// Shared config for use in the monitor signal handler
let config = Rc::new(config.clone());
// Shared handles list — populated by connect_monitor, read by fingerprint init
let all_handles: Rc<RefCell<Vec<lockscreen::LockscreenHandles>>> =
Rc::new(RefCell::new(Vec::new()));
// Shared fingerprint listener — None until async init completes.
// The monitor handler checks this to wire up FP labels on hotplugged monitors.
let shared_fp: Rc<RefCell<Option<Rc<RefCell<FingerprintListener>>>>> =