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 id: lock
locked: false locked: false
required property bool animate 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 { WlSessionLockSurface {
id: surface id: surface
color: "transparent" color: "transparent"
@@ -60,7 +63,7 @@ WlSessionLock {
ClippingRectangle { ClippingRectangle {
anchors.fill: parent anchors.fill: parent
color: "white" color: "white"
opacity: lock.animate opacity: !lock.animate || capture.ready
radius: 0 radius: 0
RectangularShadow { RectangularShadow {
anchors.fill: parent anchors.fill: parent

View File

@@ -1,4 +1,5 @@
import Quickshell import Quickshell
import Quickshell.Wayland
import Quickshell.Widgets import Quickshell.Widgets
import Quickshell.Io import Quickshell.Io
import QtQuick import QtQuick
@@ -14,6 +15,7 @@ Variants {
bottom: true bottom: true
left: true left: true
} }
WlrLayershell.namespace: "monowall"
exclusionMode: ExclusionMode.Ignore exclusionMode: ExclusionMode.Ignore
aboveWindows: false aboveWindows: false
property var modelData property var modelData
@@ -21,12 +23,17 @@ Variants {
color: "#111" color: "#111"
ClippingRectangle { ClippingRectangle {
anchors.fill: parent anchors.fill: parent
radius: 13
Image { Image {
source: Quickshell.shellPath("wallpaper") source: Quickshell.shellPath("wallpaper")
anchors.fill: parent anchors.fill: parent
fillMode: Image.PreserveAspectCrop 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.Wall {}
Shell.TopBar {id: bar} Shell.TopBar {id: bar}
Shell.Boateye {} Shell.Boateye {}
Shell.Lock { Shell.Lock {id: lock}
id: lock IpcHandler {
animate: true target: "lock"
function instalock() {lock.instalock()}
function open() {lock.open()}
function close() {lock.close()}
} }
PanelWindow { PanelWindow {
anchors { anchors {
@@ -26,10 +29,4 @@ ShellRoot {
implicitWidth: 800 implicitWidth: 800
HoverHandler {onHoveredChanged: {if (hovered) bar.open() }} 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}
}
} }