From ca1a45ccf802ca1b0727f06f7538d159aee17473 Mon Sep 17 00:00:00 2001 From: Rocho Date: Tue, 16 Jun 2026 19:45:28 +0200 Subject: [PATCH] fix(lock): dismiss fade-to-lock overlay when using a custom lock command (#2653) When a custom lock command is configured, Lock.lock() runs the command and returns early without engaging WlSessionLock, so IdleService.isShellLocked never transitions true->false. That transition is the only trigger that dismisses a completed FadeToLockWindow, so the fully-faded black overlay stays on screen and the desktop is unusable after re-login (regression from b8f4c35, which added the _completed guard and tied dismissal solely to isShellLocked). Add a dedicated dismissFadeToLock signal that the custom-lock branch emits after launching the external locker, mirroring the existing fade signal wiring, so the overlay is handed off and torn down. The built-in WlSessionLock path is unchanged and still dismisses on unlock. Fixes #2595 --- quickshell/DMSShell.qml | 6 ++++++ quickshell/Modules/Lock/Lock.qml | 4 ++++ quickshell/Services/IdleService.qml | 1 + 3 files changed, 11 insertions(+) diff --git a/quickshell/DMSShell.qml b/quickshell/DMSShell.qml index 3ec1b82f..30500b99 100644 --- a/quickshell/DMSShell.qml +++ b/quickshell/DMSShell.qml @@ -116,6 +116,12 @@ Item { fadeWindowLoader.item.cancelFade(); } } + + function onDismissFadeToLock() { + if (fadeWindowLoader.item) { + fadeWindowLoader.item.dismiss(); + } + } } } } diff --git a/quickshell/Modules/Lock/Lock.qml b/quickshell/Modules/Lock/Lock.qml index 1b06c690..c31b721f 100644 --- a/quickshell/Modules/Lock/Lock.qml +++ b/quickshell/Modules/Lock/Lock.qml @@ -60,6 +60,10 @@ Scope { function lock() { if (SettingsData.customPowerActionLock?.length > 0) { Quickshell.execDetached(["sh", "-c", SettingsData.customPowerActionLock]); + // The custom locker manages its own surface; DMS never engages + // WlSessionLock here, so isShellLocked stays false and the fade + // overlay would never be dismissed. Hand off by dismissing it now. + IdleService.dismissFadeToLock(); return; } if (shouldLock || pendingLock) diff --git a/quickshell/Services/IdleService.qml b/quickshell/Services/IdleService.qml index 46d9d2a6..4ececaf5 100644 --- a/quickshell/Services/IdleService.qml +++ b/quickshell/Services/IdleService.qml @@ -53,6 +53,7 @@ Singleton { signal lockRequested signal fadeToLockRequested signal cancelFadeToLock + signal dismissFadeToLock signal fadeToDpmsRequested signal cancelFadeToDpms signal requestMonitorOff