Integrate managed lock screen recovery

This commit is contained in:
Gabriel Brown
2026-08-18 15:00:18 -04:00
parent a80a6f4dda
commit 3e98cc2216
9 changed files with 100 additions and 8 deletions
@@ -50,6 +50,8 @@ Singleton {
return String(DesktopPreferences.get("wallpaperPath") ?? "");
}
property var applyWallpaper: function(path) { Wallpaper.set(path); }
property var regenerateLock: function() { LockScreen.regenerate(); }
property var lockBusy: function() { return LockScreen.busy; }
property var reloadShell: function() { Quickshell.reload(false); }
property var protectedDisplays: ({})
@@ -119,6 +121,7 @@ Singleton {
root.applyCompositor();
root.reloadKeybinds();
root.applyWallpaper(root.currentWallpaper());
root.regenerateLock();
settleReload.attempts = 0;
settleReload.restart();
@@ -135,7 +138,7 @@ Singleton {
// Let the current instances finish their external writes before a
// soft reload replaces them. The cap keeps a failed external tool
// from leaving restored Home state stale indefinitely.
if ((!root.keybindsReloading() && !root.systemBusy()) || attempts >= 30) {
if ((!root.keybindsReloading() && !root.systemBusy() && !root.lockBusy()) || attempts >= 30) {
stop();
root.setDisplayBlocked(false);
root.protectedDisplays = ({});
@@ -42,6 +42,8 @@ Singleton {
property var reloadKeybinds: function() { Keybinds.applyReload(); }
property var keybindsReloading: function() { return Keybinds.reloading; }
property var applyWallpaper: function(path) { Wallpaper.set(path); }
property var regenerateLock: function() { LockScreen.regenerate(); }
property var lockBusy: function() { return LockScreen.busy; }
readonly property bool busy: monitorQuery.running || serviceQuery.running || versionQuery.running
|| configWrite.running || configVerify.running || bluebubblesQuery.running
@@ -537,6 +539,7 @@ Singleton {
root.applyPersistedDisplayPolicy();
root.reloadKeybinds();
root.applyWallpaper(String(DesktopPreferences.get("wallpaperPath") ?? ""));
root.regenerateLock();
resetRelease.attempts = 0;
resetRelease.restart();
}
@@ -549,7 +552,7 @@ Singleton {
repeat: true
onTriggered: {
attempts++;
if ((!root.keybindsReloading() && !root.busy) || attempts >= 50) {
if ((!root.keybindsReloading() && !root.busy && !root.lockBusy()) || attempts >= 50) {
stop();
root.setDisplayBlocked(false);
}