| 1 |
From: Robert Tari <[email protected]> |
| 2 |
Date: Tue, 3 Dec 2024 10:23:10 +0100 |
| 3 |
Subject: src/qml/player.qml: Don't stop playback on loss of focus if |
| 4 |
Lomiri is running in windowed mode |
| 5 |
|
| 6 |
Forwarded: https://gitlab.com/ubports/development/core/lomiri-mediaplayer-app/-/merge_requests/39 |
| 7 |
--- |
| 8 |
src/qml/player.qml | 8 +++++++- |
| 9 |
1 file changed, 7 insertions(+), 1 deletion(-) |
| 10 |
|
| 11 |
diff --git a/src/qml/player.qml b/src/qml/player.qml |
| 12 |
index 3b3c689..3da30dc 100644 |
| 13 |
--- a/src/qml/player.qml |
| 14 |
+++ b/src/qml/player.qml |
| 15 |
@@ -26,6 +26,7 @@ import Lomiri.Action 1.1 as LomiriAction |
| 16 |
import Lomiri.Components 1.3 |
| 17 |
import Lomiri.Components.Popups 1.3 as Popups |
| 18 |
import Lomiri.Content 1.3 |
| 19 |
+import GSettings 1.0 |
| 20 |
|
| 21 |
Item { |
| 22 |
id: mediaPlayer |
| 23 |
@@ -47,7 +48,7 @@ Item { |
| 24 |
|
| 25 |
onAppActiveChanged: { |
| 26 |
if (!appActive && |
| 27 |
- !mpApplication.desktopMode && |
| 28 |
+ settings.usageMode != "Windowed" && |
| 29 |
playerLoader.item && |
| 30 |
playerLoader.item.playing) { |
| 31 |
playerLoader.item.pause() |
| 32 |
@@ -267,4 +268,9 @@ Item { |
| 33 |
} |
| 34 |
} |
| 35 |
} |
| 36 |
+ |
| 37 |
+ GSettings { |
| 38 |
+ id: settings |
| 39 |
+ schema.id: "com.lomiri.Shell" |
| 40 |
+ } |
| 41 |
} |