File: 1019_WorkspacePreview-reduce-lag-when-app-enters-exit-ful.patch

package info (click to toggle)
lomiri 0.5.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,088 kB
  • sloc: cpp: 39,498; python: 2,559; javascript: 1,426; ansic: 1,012; sh: 289; xml: 252; makefile: 69
file content (36 lines) | stat: -rw-r--r-- 1,367 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 6a55424041845a6e98fcf035cad5f29dc7611443 Mon Sep 17 00:00:00 2001
From: Ratchanan Srirattanamet <ratchanan@ubports.com>
Date: Tue, 7 Jan 2025 00:24:51 +0700
Subject: [PATCH] WorkspacePreview: reduce lag when app enters/exit fullscreen

As discovered in #122, after commit c4f50475 ("Fixes and adjustments in
the workspace previews") WorkspacePreview is being resized when an app
enter or leave fullscreen mode. This causes preview's background image
to be reloaded as well.

Commit 3f991507 ("Workspaces: use AvailableDesktopArea for screen space
instead") allows image reload to not be tied to animation. This commit
additionally set image to load asynchronously, which should reduce lag
further.

Bug: https://gitlab.com/ubports/development/core/lomiri/-/issues/122
Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
---
 qml/Stage/Spread/WorkspacePreview.qml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qml/Stage/Spread/WorkspacePreview.qml b/qml/Stage/Spread/WorkspacePreview.qml
index 3d0989f6d..85b6ae4fe 100644
--- a/qml/Stage/Spread/WorkspacePreview.qml
+++ b/qml/Stage/Spread/WorkspacePreview.qml
@@ -47,6 +47,7 @@ Item {
         sourceSize.height: height
         fillMode: Image.PreserveAspectCrop
         autoTransform: true
+        asynchronous: true
 
         Repeater {
             id: topLevelSurfaceRepeater
-- 
2.47.2