mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-03 20:32:07 -04:00
fix: redraw wallpaper after DMS lock screen is dismissed (#2037)
After unlocking the screen (startup lock or wake from sleep), the desktop showed Hyprland's background color instead of the wallpaper. WallpaperBackground disables QML updates via updatesEnabled after a 1-second settle timer. While WlSessionLock is active, Hyprland does not composite the background layer, so when the lock is released it needs a fresh Wayland buffer — but none is committed because the render loop is already paused. The previous attempt used SessionService.sessionUnlocked, which is unreliable for the startup lock case: DMSService is not yet connected when lock() is called at startup, so notifyLoginctl is a no-op and the loginctl state never transitions, meaning sessionUnlocked never fires. Fix by tracking the shell lock state directly from Lock.qml's shouldLock via a new IdleService.isShellLocked property. WallpaperBackground watches this and re-enables rendering for 1 second on unlock, ensuring a fresh buffer is committed to Wayland before the compositor resumes displaying the layer.
This commit is contained in:
@@ -14,6 +14,7 @@ Scope {
|
|||||||
property bool shouldLock: false
|
property bool shouldLock: false
|
||||||
|
|
||||||
onShouldLockChanged: {
|
onShouldLockChanged: {
|
||||||
|
IdleService.isShellLocked = shouldLock;
|
||||||
if (shouldLock && lockPowerOffArmed) {
|
if (shouldLock && lockPowerOffArmed) {
|
||||||
lockStateCheck.restart();
|
lockStateCheck.restart();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,6 +151,16 @@ Variants {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: IdleService
|
||||||
|
function onIsShellLockedChanged() {
|
||||||
|
if (!IdleService.isShellLocked) {
|
||||||
|
root._renderSettling = true;
|
||||||
|
renderSettleTimer.restart();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: renderSettleTimer
|
id: renderSettleTimer
|
||||||
interval: 1000
|
interval: 1000
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ Singleton {
|
|||||||
property var suspendMonitor: null
|
property var suspendMonitor: null
|
||||||
property var lockComponent: null
|
property var lockComponent: null
|
||||||
property bool monitorsOff: false
|
property bool monitorsOff: false
|
||||||
|
property bool isShellLocked: false
|
||||||
|
|
||||||
function wake() {
|
function wake() {
|
||||||
requestMonitorOn();
|
requestMonitorOn();
|
||||||
|
|||||||
Reference in New Issue
Block a user