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:
@@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user