1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-01 19:18:28 -04:00

lock: fix dpms fade surface getting stuck after unlock

port 1.5
This commit is contained in:
bbedward
2026-07-20 10:39:44 -04:00
parent dc75f1f01d
commit 116cef0b3a
3 changed files with 24 additions and 1 deletions
+8
View File
@@ -139,6 +139,14 @@ Item {
return; return;
fadeDpmsWindowLoader.loadedWindow.cancelFade(); fadeDpmsWindowLoader.loadedWindow.cancelFade();
} }
function onMonitorsOffChanged() {
if (IdleService.monitorsOff)
return;
if (!fadeDpmsWindowLoader.loadedWindow)
return;
fadeDpmsWindowLoader.loadedWindow.dismiss();
}
} }
} }
} }
+15 -1
View File
@@ -4,6 +4,7 @@ import QtQuick
import Quickshell import Quickshell
import Quickshell.Wayland import Quickshell.Wayland
import qs.Common import qs.Common
import qs.Services
PanelWindow { PanelWindow {
id: root id: root
@@ -65,10 +66,23 @@ PanelWindow {
} }
function cancelFade() { function cancelFade() {
dismiss();
fadeCancelled();
}
function dismiss() {
fadeSeq.stop(); fadeSeq.stop();
fadeOverlay.opacity = 0.0; fadeOverlay.opacity = 0.0;
active = false; active = false;
fadeCancelled(); }
Connections {
target: IdleService
function onIsShellLockedChanged() {
if (IdleService.isShellLocked)
return;
root.dismiss();
}
} }
MouseArea { MouseArea {
+1
View File
@@ -335,6 +335,7 @@ Scope {
notifyLockedHint(sessionLock.secure); notifyLockedHint(sessionLock.secure);
if (!sessionLock.secure) if (!sessionLock.secure)
return; return;
IdleService.dismissFadeToLock();
lockRetryAttempts = 0; lockRetryAttempts = 0;
pendingLock = false; pendingLock = false;
if (lockPowerOffArmed && powerOffOnLock) if (lockPowerOffArmed && powerOffOnLock)