mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 22:15:38 -05:00
lock: fix passing screenName to surface
This commit is contained in:
@@ -82,12 +82,16 @@ Scope {
|
|||||||
locked: shouldLock
|
locked: shouldLock
|
||||||
|
|
||||||
WlSessionLockSurface {
|
WlSessionLockSurface {
|
||||||
|
id: lockSurface
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
LockSurface {
|
LockSurface {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
lock: sessionLock
|
lock: sessionLock
|
||||||
sharedPasswordBuffer: root.sharedPasswordBuffer
|
sharedPasswordBuffer: root.sharedPasswordBuffer
|
||||||
|
screenName: lockSurface.screen?.name ?? ""
|
||||||
|
isLocked: shouldLock
|
||||||
onUnlockRequested: {
|
onUnlockRequested: {
|
||||||
root.unlock()
|
root.unlock()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ Rectangle {
|
|||||||
|
|
||||||
required property WlSessionLock lock
|
required property WlSessionLock lock
|
||||||
required property string sharedPasswordBuffer
|
required property string sharedPasswordBuffer
|
||||||
|
required property string screenName
|
||||||
|
required property bool isLocked
|
||||||
|
|
||||||
signal passwordChanged(string newPassword)
|
signal passwordChanged(string newPassword)
|
||||||
signal unlockRequested()
|
signal unlockRequested()
|
||||||
@@ -17,10 +19,12 @@ Rectangle {
|
|||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
LockScreenContent {
|
LockScreenContent {
|
||||||
|
id: lockContent
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
demoMode: false
|
demoMode: false
|
||||||
passwordBuffer: root.sharedPasswordBuffer
|
passwordBuffer: root.sharedPasswordBuffer
|
||||||
screenName: ""
|
screenName: root.screenName
|
||||||
onUnlockRequested: root.unlockRequested()
|
onUnlockRequested: root.unlockRequested()
|
||||||
onPasswordBufferChanged: {
|
onPasswordBufferChanged: {
|
||||||
if (root.sharedPasswordBuffer !== passwordBuffer) {
|
if (root.sharedPasswordBuffer !== passwordBuffer) {
|
||||||
@@ -28,4 +32,10 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onIsLockedChanged: {
|
||||||
|
if (!isLocked) {
|
||||||
|
lockContent.unlocking = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user