fix: lock screencopy not working

This commit is contained in:
2 * r + 2 * t 2026-05-06 21:04:43 +10:00
parent 54cdd80c1b
commit 4763a690cd

View file

@ -1,5 +1,6 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Io
import Quickshell.Wayland
@ -25,6 +26,20 @@ Scope {
lock: lock
}
Loader {
asynchronous: true
active: true
onLoaded: active = false
// Force a load of a screencopy so the one in the lock works
// My guess is the ICC backend loads async on first request, which if the lock is
// the first request it fails to capture (because it's async and the compositor
// refuses capture when locked)
sourceComponent: ScreencopyView {
captureSource: Quickshell.screens[0]
}
}
// qmllint disable unresolved-type
CustomShortcut {
// qmllint enable unresolved-type