1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

lock: fix passing screenName to surface

This commit is contained in:
bbedward
2025-10-18 12:53:19 -04:00
parent 7c1e247ef8
commit 8acde3a347
2 changed files with 15 additions and 1 deletions

View File

@@ -82,12 +82,16 @@ Scope {
locked: shouldLock
WlSessionLockSurface {
id: lockSurface
color: "transparent"
LockSurface {
anchors.fill: parent
lock: sessionLock
sharedPasswordBuffer: root.sharedPasswordBuffer
screenName: lockSurface.screen?.name ?? ""
isLocked: shouldLock
onUnlockRequested: {
root.unlock()
}

View File

@@ -10,6 +10,8 @@ Rectangle {
required property WlSessionLock lock
required property string sharedPasswordBuffer
required property string screenName
required property bool isLocked
signal passwordChanged(string newPassword)
signal unlockRequested()
@@ -17,10 +19,12 @@ Rectangle {
color: "transparent"
LockScreenContent {
id: lockContent
anchors.fill: parent
demoMode: false
passwordBuffer: root.sharedPasswordBuffer
screenName: ""
screenName: root.screenName
onUnlockRequested: root.unlockRequested()
onPasswordBufferChanged: {
if (root.sharedPasswordBuffer !== passwordBuffer) {
@@ -28,4 +32,10 @@ Rectangle {
}
}
}
onIsLockedChanged: {
if (!isLocked) {
lockContent.unlocking = false
}
}
}