fix: quit in ::unlocked instead of after unlock() (v0.6.17)
The real cause of the unlock SIGSEGV: gtk4-session-lock destroys the lock windows itself when the lock ends (per its header), so unlock_callback's `unlock(); app.quit();` destroyed them a second time — surface already gone → gdk_surface_get_display NULL → crash in gtk_window_destroy. Reproduces on a plain single-monitor lock/unlock, no suspend needed. unlock_callback now calls only unlock(); a new connect_unlocked handler quits the app after the library finishes teardown. Mirrors the upstream examples/simple.rs exactly. Reverts the v0.6.15/v0.6.16 monitor-pruning + LockscreenHandles.monitor: it was a misdiagnosis (the crash is monitor-independent) and manually manipulated library-managed lock windows, which the upstream example explicitly warns against. Monitor removal is left to the library.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "moonlock"
|
||||
version = "0.6.16"
|
||||
version = "0.6.17"
|
||||
edition = "2024"
|
||||
description = "A secure Wayland lockscreen with GTK4, PAM and fingerprint support"
|
||||
license = "MIT"
|
||||
|
||||
Reference in New Issue
Block a user