SHA256
1
0
forked from pool/breeze

Accepting request 1082880 from home:Vogtinator:plasma5.27

- Add patch to avoid CPU use in idle apps (boo#1210747, kde#468903):
  * 0001-ProgressBar-Stop-emitting-polish-requests-when-item-.patch

OBS-URL: https://build.opensuse.org/request/show/1082880
OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/breeze?expand=0&rev=409
This commit is contained in:
Christophe Marin 2023-04-26 20:04:41 +00:00 committed by Git OBS Bridge
parent 9804476bce
commit bf02b7e9b2
3 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,53 @@
From 633a368833e824bf8b62d344057d079a1f533459 Mon Sep 17 00:00:00 2001
From: ivan tkachenko <me@ratijas.tk>
Date: Sun, 26 Feb 2023 00:17:53 +0300
Subject: [PATCH] ProgressBar: Stop emitting polish requests when item becomes
invisible
BUG: 468903
---
kstyle/animations/breezebusyindicatorengine.cpp | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/kstyle/animations/breezebusyindicatorengine.cpp b/kstyle/animations/breezebusyindicatorengine.cpp
index 15d110e9..7fa8300b 100644
--- a/kstyle/animations/breezebusyindicatorengine.cpp
+++ b/kstyle/animations/breezebusyindicatorengine.cpp
@@ -4,10 +4,16 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
+#include "config-breeze.h"
+
#include "breezebusyindicatorengine.h"
#include "breezemetrics.h"
+#if BREEZE_HAVE_QTQUICK
+#include <QQuickItem>
+#endif
+
#include <QVariant>
namespace Breeze
@@ -32,6 +38,17 @@ bool BusyIndicatorEngine::registerWidget(QObject *object)
// connect destruction signal
connect(object, SIGNAL(destroyed(QObject *)), this, SLOT(unregisterWidget(QObject *)), Qt::UniqueConnection);
+
+#if BREEZE_HAVE_QTQUICK
+ if (QQuickItem *item = qobject_cast<QQuickItem *>(object)) {
+ connect(item, &QQuickItem::visibleChanged, this, [=]() {
+ if (!item->isVisible()) {
+ this->setAnimated(object, false);
+ }
+ // no need for the else {} branch, as its animation will be reset anyway
+ });
+ }
+#endif
}
return true;
--
2.40.0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Apr 26 06:25:30 UTC 2023 - Fabian Vogt <fabian@ritter-vogt.de>
- Add patch to avoid CPU use in idle apps (boo#1210747, kde#468903):
* 0001-ProgressBar-Stop-emitting-polish-requests-when-item-.patch
-------------------------------------------------------------------
Tue Apr 4 15:05:32 UTC 2023 - Fabian Vogt <fabian@ritter-vogt.de>

View File

@ -33,6 +33,8 @@ Source: https://download.kde.org/stable/plasma/%{version}/breeze-%{versi
Source1: https://download.kde.org/stable/plasma/%{version}/breeze-%{version}.tar.xz.sig
Source2: plasma.keyring
%endif
# PATCH-FIX-UPSTREAM
Patch1: 0001-ProgressBar-Stop-emitting-polish-requests-when-item-.patch
# PATCH-FEATURE-UPSTREAM
Patch100: 0001-Outline-intensity-setting.patch
# PATCH-FIX-OPENSUSE for ^