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:
Generated
+1
-1
@@ -575,7 +575,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "moonlock"
|
name = "moonlock"
|
||||||
version = "0.6.15"
|
version = "0.6.16"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gdk-pixbuf",
|
"gdk-pixbuf",
|
||||||
"gdk4",
|
"gdk4",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "moonlock"
|
name = "moonlock"
|
||||||
version = "0.6.15"
|
version = "0.6.16"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
description = "A secure Wayland lockscreen with GTK4, PAM and fingerprint support"
|
description = "A secure Wayland lockscreen with GTK4, PAM and fingerprint support"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
+4
-21
@@ -72,39 +72,18 @@ fn activate_with_session_lock(
|
|||||||
.and_then(|path| lockscreen::load_background_texture(&path)),
|
.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.
|
// Shared unlock callback — unlocks session and quits.
|
||||||
// Guard prevents double-unlock if PAM and fingerprint succeed simultaneously.
|
// Guard prevents double-unlock if PAM and fingerprint succeed simultaneously.
|
||||||
let lock_clone = lock.clone();
|
let lock_clone = lock.clone();
|
||||||
let app_clone = app.clone();
|
let app_clone = app.clone();
|
||||||
let already_unlocked = Rc::new(Cell::new(false));
|
let already_unlocked = Rc::new(Cell::new(false));
|
||||||
let au = already_unlocked.clone();
|
let au = already_unlocked.clone();
|
||||||
let all_handles_dbg = all_handles.clone();
|
|
||||||
let unlock_callback: Rc<dyn Fn()> = Rc::new(move || {
|
let unlock_callback: Rc<dyn Fn()> = Rc::new(move || {
|
||||||
if au.get() {
|
if au.get() {
|
||||||
log::debug!("Unlock already triggered, ignoring duplicate");
|
log::debug!("Unlock already triggered, ignoring duplicate");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
au.set(true);
|
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();
|
lock_clone.unlock();
|
||||||
app_clone.quit();
|
app_clone.quit();
|
||||||
});
|
});
|
||||||
@@ -116,6 +95,10 @@ fn activate_with_session_lock(
|
|||||||
// Shared config for use in the monitor signal handler
|
// Shared config for use in the monitor signal handler
|
||||||
let config = Rc::new(config.clone());
|
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.
|
// Shared fingerprint listener — None until async init completes.
|
||||||
// The monitor handler checks this to wire up FP labels on hotplugged monitors.
|
// The monitor handler checks this to wire up FP labels on hotplugged monitors.
|
||||||
let shared_fp: Rc<RefCell<Option<Rc<RefCell<FingerprintListener>>>>> =
|
let shared_fp: Rc<RefCell<Option<Rc<RefCell<FingerprintListener>>>>> =
|
||||||
|
|||||||
Reference in New Issue
Block a user