Fix lock flicker

This commit is contained in:
2026-05-15 10:03:55 -07:00
parent 391bd7dc16
commit dbb1bf55c9
3 changed files with 18 additions and 11 deletions

View File

@@ -11,6 +11,9 @@ WlSessionLock {
id: lock
locked: false
required property bool animate
function instalock() {lock.animate = false; lock.locked = true}
function open() {lock.animate = true; lock.locked = true}
function close() {lock.locked = false}
WlSessionLockSurface {
id: surface
color: "transparent"
@@ -60,7 +63,7 @@ WlSessionLock {
ClippingRectangle {
anchors.fill: parent
color: "white"
opacity: lock.animate
opacity: !lock.animate || capture.ready
radius: 0
RectangularShadow {
anchors.fill: parent

View File

@@ -1,4 +1,5 @@
import Quickshell
import Quickshell.Wayland
import Quickshell.Widgets
import Quickshell.Io
import QtQuick
@@ -14,6 +15,7 @@ Variants {
bottom: true
left: true
}
WlrLayershell.namespace: "monowall"
exclusionMode: ExclusionMode.Ignore
aboveWindows: false
property var modelData
@@ -21,12 +23,17 @@ Variants {
color: "#111"
ClippingRectangle {
anchors.fill: parent
radius: 13
Image {
source: Quickshell.shellPath("wallpaper")
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
}
radius: 40
PropertyAnimation on radius {
to: 14
duration: 300
}
property real intro_progress: 0
}
}
}

View File

@@ -12,9 +12,12 @@ ShellRoot {
Shell.Wall {}
Shell.TopBar {id: bar}
Shell.Boateye {}
Shell.Lock {
id: lock
animate: true
Shell.Lock {id: lock}
IpcHandler {
target: "lock"
function instalock() {lock.instalock()}
function open() {lock.open()}
function close() {lock.close()}
}
PanelWindow {
anchors {
@@ -26,10 +29,4 @@ ShellRoot {
implicitWidth: 800
HoverHandler {onHoveredChanged: {if (hovered) bar.open() }}
}
IpcHandler {
target: "lock"
function instalock() {lock.animate = false; lock.locked = true}
function open() {lock.animate = true; lock.locked = true}
function close() {lock.locked = false}
}
}