Draw the lock screen video from the OWE lock feed

The shell drops its own player: BackgroundMedia is image-only, and the
lock loads Owe.LockFeedSurface through a Loader, so a system without the
module shows no lock video instead of losing the whole lock screen. The
feed pauses per output when the panel blanks or power saver turns on.

The lock view keeps its still effect path and darkens the feed for
legibility. QtMultimedia and the shell video pause policy are gone, and
the base package list requires owe and owe-lockfeed instead.
This commit is contained in:
Bjarne Oeverli committed 2026-09-18 22:49:47 +02:00
1 parent 2e3142a105
commit eff410f91e
8 files changed
+92 -248

No files matched your search

-7
View File
@@ -16,7 +16,6 @@ Item {
property string currentBackground: ""
property string displayedBackground: ""
property int displayedReloads: 0
property string incomingBackground: ""
property string oldBackground: ""
property bool finishingTransition: false
@@ -60,9 +59,6 @@ Item {
if (instant || !displayedBackground || isVideo(path) || isVideo(displayedBackground)) {
oldBackground = ""
incomingBackground = ""
// A theme switch can replace the file behind an unchanged path, which
// an unchanged property would never pick up.
if (displayedBackground === finalPath) displayedReloads += 1
displayedBackground = finalPath
revealProgress = 1
return
@@ -187,7 +183,6 @@ Item {
}
Component.onCompleted: {
oweStatusProc.running = true
refreshBackground()
}
@@ -237,8 +232,6 @@ Item {
id: base
anchors.fill: parent
path: root.displayedBackground
reloads: root.displayedReloads
videoEnabled: false
onReadyChanged: {
if (ready && root.finishingTransition) {
root.incomingBackground = ""
+11
View File
@@ -0,0 +1,11 @@
import QtQuick
import Owe.LockFeed
// Loaded through a Loader from LockView, so a system without the module shows
// no lock video instead of losing the whole lock screen.
LockFeed {
id: root
property bool feedEnabled: true
active: root.feedEnabled
}
+28 -7
View File
@@ -43,6 +43,9 @@ Item {
? Border.surfaceSpec("lock", "border-error", Color.lock.borderError, root.outlineThickness, "border-alpha")
: Border.surfaceSpec("lock", "border-active", Color.lock.borderActive, root.outlineThickness, "border-alpha")
readonly property bool video: Util.isVideoPath(root.backgroundPath)
readonly property bool feedActive: root.video && root.loadBackground && !root.displaysBlank && !root.powerSaverActive
signal submitPassword(string password)
signal passwordTextEdited(string password)
signal clearFailureRequested()
@@ -89,15 +92,33 @@ Item {
BackgroundMedia {
id: wallpaper
anchors.fill: parent
path: root.loadBackground ? root.backgroundPath : ""
path: root.video ? "" : root.backgroundPath
version: root.backgroundVersion
playbackEnabled: root.loadBackground && !root.displaysBlank && !root.powerSaverActive
visible: !root.video
}
// OWE decodes the video once and feeds these frames to every lock surface.
// The feed pauses when this output blanks or on battery power saver.
Loader {
id: feedLoader
anchors.fill: parent
active: root.video
source: "LockFeedSurface.qml"
visible: status === Loader.Ready
Binding {
target: feedLoader.item
property: "feedEnabled"
value: root.feedActive
when: feedLoader.item !== null
restoreMode: Binding.RestoreNone
}
}
MultiEffect {
anchors.fill: wallpaper
source: wallpaper.video ? null : wallpaper
visible: !wallpaper.video
source: root.video ? null : wallpaper
visible: !root.video
autoPaddingEnabled: false
blurEnabled: root.loadBackground && wallpaper.ready
blur: 1.0
@@ -106,11 +127,11 @@ Item {
contrast: -0.08
}
// Qt's video output cannot be sampled by MultiEffect on every renderer.
// The feed item cannot be sampled by MultiEffect on every renderer.
// Keep video wallpapers visible and darken them slightly for legibility.
Rectangle {
anchors.fill: wallpaper
visible: wallpaper.video
anchors.fill: feedLoader
visible: root.video
color: "#22000000"
}