lock: fix exit anim for multimon

This commit is contained in:
2 * r + 2 * t 2025-06-25 14:47:05 +10:00
parent 3f981680ef
commit 0bf32f7b8f
2 changed files with 14 additions and 4 deletions

View file

@ -12,6 +12,8 @@ Scope {
WlSessionLock { WlSessionLock {
id: lock id: lock
property bool unlocked
locked: true locked: true
onLockedChanged: { onLockedChanged: {

View file

@ -10,15 +10,15 @@ WlSessionLockSurface {
required property WlSessionLock lock required property WlSessionLock lock
property bool locked property bool thisLocked
readonly property bool locked: thisLocked && !lock.unlocked
function unlock(): void { function unlock(): void {
locked = false; lock.unlocked = true;
background.opacity = 0;
animDelay.start(); animDelay.start();
} }
Component.onCompleted: locked = true Component.onCompleted: thisLocked = true
color: "transparent" color: "transparent"
@ -29,6 +29,14 @@ WlSessionLockSurface {
onTriggered: root.lock.locked = false onTriggered: root.lock.locked = false
} }
Connections {
target: root.lock
function onUnlockedChanged(): void {
background.opacity = 0;
}
}
ScreencopyView { ScreencopyView {
id: screencopy id: screencopy