mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
LockScreen: add slight delay for pam to initilize before suspend
This commit is contained in:
@@ -20,7 +20,26 @@ Loader {
|
||||
// Track if the visualizer should be shown (lockscreen active + media playing + non-compact mode)
|
||||
readonly property bool needsCava: root.active && !Settings.data.general.compactLockScreen && Settings.data.audio.visualizerType !== "" && Settings.data.audio.visualizerType !== "none"
|
||||
|
||||
// Readiness for suspend - wait a bit to ensure PAM (fprintd) has time to initialize
|
||||
property bool readyForSuspend: false
|
||||
|
||||
Timer {
|
||||
id: suspendReadinessTimer
|
||||
interval: 800 // 800ms should be enough for PAM to start
|
||||
repeat: false
|
||||
running: root.active
|
||||
onTriggered: {
|
||||
root.readyForSuspend = true;
|
||||
Logger.i("LockScreen", "Ready for suspend (PAM initialization time elapsed)");
|
||||
}
|
||||
}
|
||||
|
||||
onActiveChanged: {
|
||||
if (root.active) {
|
||||
root.readyForSuspend = false;
|
||||
suspendReadinessTimer.restart();
|
||||
}
|
||||
|
||||
if (root.active && root.needsCava) {
|
||||
CavaService.registerComponent("lockscreen");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user