Support Plasma 6.8 unlock prompts across screen blanking
Keep prompt visibility separate from native authentication, reapply the patch after lock-screen file updates, and retain Plasma 6.7 compatibility. Add modern patch and visibility regression tests and document Fedora 45 package support.
This commit is contained in:
1 parent
851e0d1d24
commit
d2a6aafc71
10 files changed
+871
-38
No files matched your search
@@ -0,0 +1,53 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import QtQml
|
||||
|
||||
QtObject {
|
||||
id: policy
|
||||
|
||||
required property QtObject window
|
||||
required property QtObject screen
|
||||
required property QtObject idleTimer
|
||||
|
||||
function reveal() {
|
||||
if (window && window.visible && window.active) {
|
||||
if ("seenPositionChange" in screen) {
|
||||
screen.seenPositionChange = true;
|
||||
}
|
||||
screen.uiVisible = true;
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
idleTimer.stop();
|
||||
// Wait until the lock screen has finished constructing its authenticators.
|
||||
Qt.callLater(reveal);
|
||||
}
|
||||
onWindowChanged: Qt.callLater(reveal)
|
||||
|
||||
property Connections visibilityChanges: Connections {
|
||||
target: policy.window
|
||||
function onVisibleChanged() { Qt.callLater(policy.reveal); }
|
||||
function onActiveChanged() { Qt.callLater(policy.reveal); }
|
||||
}
|
||||
|
||||
property Connections promptChanges: Connections {
|
||||
target: policy.screen
|
||||
function onUiVisibleChanged() {
|
||||
// Escape powers off the display in the greeter itself. Keep the
|
||||
// active screen's prompt ready for when the display wakes again.
|
||||
if (!policy.screen.uiVisible) {
|
||||
Qt.callLater(policy.reveal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property Connections idleChanges: Connections {
|
||||
target: policy.idleTimer
|
||||
function onRunningChanged() {
|
||||
if (policy.idleTimer.running) {
|
||||
policy.idleTimer.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user