Fix UI lag when switching virtual desktop
Fixes the UI lag caused by the floating panel animation
This commit is contained in:
parent
cf3a47dfea
commit
9a7eaaae1c
4 changed files with 100 additions and 2 deletions
42
sonic-workspace/sonic-workspace-6.6.4-x11-panel-lag.patch
Normal file
42
sonic-workspace/sonic-workspace-6.6.4-x11-panel-lag.patch
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
From: Anders da Silva Rytter Hansen <andersrh@users.noreply.github.com>
|
||||
Date: Thu, 2 Jul 2026 09:40:00 -0300
|
||||
Subject: [PATCH] shell: handle zero-duration floating panel animation
|
||||
|
||||
The QML side now disables the floating panel animation by setting
|
||||
floatingnessAnimationDuration to 0. With a zero-duration
|
||||
QPropertyAnimation the valueChanged signal may not be emitted, so update
|
||||
m_floatingness and the QML property synchronously before doing the
|
||||
geometry/mask/strut updates.
|
||||
|
||||
References: https://bugs.kde.org/show_bug.cgi?id=484501 and https://github.com/orgs/Sonic-DE/discussions/20
|
||||
---
|
||||
shell/panelview.cpp | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/shell/panelview.cpp b/shell/panelview.cpp
|
||||
--- a/shell/panelview.cpp
|
||||
+++ b/shell/panelview.cpp
|
||||
@@ -1782,6 +1782,13 @@ void PanelView::updateFloating()
|
||||
m_topFloatingPadding = rootObject()->property("fixedTopFloatingPadding").toInt();
|
||||
m_bottomFloatingPadding = rootObject()->property("fixedBottomFloatingPadding").toInt();
|
||||
|
||||
+ const bool instantAnimation = m_floatingnessAnimation.duration() == 0;
|
||||
+ if (instantAnimation) {
|
||||
+ // Skip the animation; jump straight to the target value.
|
||||
+ m_floatingness = m_floatingnessAnimation.endValue().toDouble();
|
||||
+ rootObject()->setProperty("floatingness", m_floatingness);
|
||||
+ }
|
||||
+
|
||||
positionAndResizePanel();
|
||||
updateExclusiveZone();
|
||||
updateShadows();
|
||||
@@ -1789,6 +1796,10 @@ void PanelView::updateFloating()
|
||||
// positionPanel and updateMask are called by m_floatingnessAnimation
|
||||
if (m_floatingnessAnimation.targetObject()) {
|
||||
+ if (instantAnimation) {
|
||||
+ updateMask();
|
||||
+ return;
|
||||
+ }
|
||||
m_floatingnessAnimation.start();
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
Name: sonic-workspace
|
||||
Summary: Plasma workspace, applications and applets
|
||||
Version: 6.6.4
|
||||
Release: 13%{?dist}
|
||||
Release: 14%{?dist}
|
||||
|
||||
# Automatically converted from old format: BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND LGPL-3.0-only AND LGPL-3.0-or-later AND (GPL-2.0-only OR GPL-3.0-only) AND (LGPL-2.1-only OR LGPL-3.0-only) AND MIT - review is highly recommended.
|
||||
License: BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND LGPL-3.0-only AND LGPL-3.0-or-later AND (GPL-2.0-only OR GPL-3.0-only) AND (LGPL-2.1-only OR LGPL-3.0-only) AND MIT
|
||||
|
|
@ -46,6 +46,10 @@ Patch106: plasma-workspace-5.27.80-enable-open-terminal-action.patch
|
|||
# default to enable the lock/logout actions
|
||||
Patch107: plasma-workspace-5.27.80-enable-lock-logout-action.patch
|
||||
|
||||
# Handle zero-duration floating panel animation now that the QML side disables
|
||||
# the animation entirely.
|
||||
Patch108: sonic-workspace-6.6.4-x11-panel-lag.patch
|
||||
|
||||
# udev
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: libGL-devel
|
||||
|
|
@ -690,6 +694,10 @@ fi
|
|||
|
||||
|
||||
%changelog
|
||||
* Thu Jul 02 2026 Anders da Silva Rytter Hansen <andersrh@users.noreply.github.com> - 6.6.4-14
|
||||
- Handle zero-duration floating panel animation so the panel can switch states
|
||||
instantly without stutter.
|
||||
|
||||
* Fri Apr 10 2026 Steve Cossette <farchord@gmail.com> - 6.6.4-1
|
||||
- 6.6.4
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue