commit:     79ed50f28c3c915c71608be59d6b1fd7b326d814
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat May 29 20:12:57 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat May 29 21:16:21 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79ed50f2

kde-plasma/breeze: Fix splitter proxy

Upstream commit f99b7ef621c9c69544158d245699fd8104db6753

See also:
https://mail.kde.org/pipermail/distributions/2021-May/001012.html

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=436473
Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-plasma/breeze/breeze-5.21.5-r1.ebuild          | 53 ++++++++++++++++++++++
 .../files/breeze-5.21.5-fix-splitter-proxy.patch   | 50 ++++++++++++++++++++
 2 files changed, 103 insertions(+)

diff --git a/kde-plasma/breeze/breeze-5.21.5-r1.ebuild 
b/kde-plasma/breeze/breeze-5.21.5-r1.ebuild
new file mode 100644
index 00000000000..c87f6e948b9
--- /dev/null
+++ b/kde-plasma/breeze/breeze-5.21.5-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+KFMIN=5.82.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+inherit ecm kde.org
+
+DESCRIPTION="Breeze visual style for the Plasma desktop"
+HOMEPAGE="https://invent.kde.org/plasma/breeze";
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="X"
+
+RDEPEND="
+       >=dev-qt/qtdbus-${QTMIN}:5
+       >=dev-qt/qtdeclarative-${QTMIN}:5
+       >=dev-qt/qtgui-${QTMIN}:5
+       >=dev-qt/qtwidgets-${QTMIN}:5
+       >=dev-qt/qtx11extras-${QTMIN}:5
+       >=kde-frameworks/frameworkintegration-${KFMIN}:5
+       >=kde-frameworks/kcmutils-${KFMIN}:5
+       >=kde-frameworks/kconfig-${KFMIN}:5
+       >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+       >=kde-frameworks/kcoreaddons-${KFMIN}:5
+       >=kde-frameworks/kguiaddons-${KFMIN}:5
+       >=kde-frameworks/ki18n-${KFMIN}:5
+       >=kde-frameworks/kiconthemes-${KFMIN}:5
+       >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+       >=kde-frameworks/kwindowsystem-${KFMIN}:5
+       >=kde-plasma/kdecoration-${PVCUT}:5
+       X? ( x11-libs/libxcb )
+"
+DEPEND="${RDEPEND}
+       >=kde-frameworks/kpackage-${KFMIN}:5
+"
+PDEPEND="
+       >=kde-frameworks/breeze-icons-${KFMIN}:5
+       >=kde-plasma/kde-cli-tools-${PVCUT}:5
+"
+
+PATCHES=( "${FILESDIR}/${P}-fix-splitter-proxy.patch" )
+
+src_configure() {
+       local mycmakeargs=(
+               $(cmake_use_find_package X XCB)
+       )
+       ecm_src_configure
+}

diff --git a/kde-plasma/breeze/files/breeze-5.21.5-fix-splitter-proxy.patch 
b/kde-plasma/breeze/files/breeze-5.21.5-fix-splitter-proxy.patch
new file mode 100644
index 00000000000..52646721a4b
--- /dev/null
+++ b/kde-plasma/breeze/files/breeze-5.21.5-fix-splitter-proxy.patch
@@ -0,0 +1,50 @@
+From f99b7ef621c9c69544158d245699fd8104db6753 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <[email protected]>
+Date: Sat, 15 May 2021 17:45:54 +0200
+Subject: [PATCH] Fix informing the underlying widget when leaving
+ SplitterProxy
+
+While the SplitterProxy is active, it intercepts all relevant events, so that
+the underlying widget still thinks it's in the same "on splitter" state. When
+the SplitterProxy is left, the underlying widget is sent a HoverLeave/HoverMove
+event to make it aware of the new current cursor position. Without this, it
+doesn't know that it's not supposed to be in the "on splitter" state, and when
+it regains focus it just re-activates the SplitterProxy at the current cursor
+position.
+
+This was broken by accident in d201a1f187 ("Fix SplitterProxy not clearing
+when above another QSplitterHandle"), which moved the hide() call past the
+call to QCoreApplication::sendEvent. Previously that made isVisible() false,
+which also prevented the interception of the HoverLeave/HoverMove events.
+
+BUG: 436473
+---
+ kstyle/breezesplitterproxy.cpp | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/kstyle/breezesplitterproxy.cpp b/kstyle/breezesplitterproxy.cpp
+index 0cf5685f..d4db407b 100644
+--- a/kstyle/breezesplitterproxy.cpp
++++ b/kstyle/breezesplitterproxy.cpp
+@@ -341,11 +341,14 @@ namespace Breeze
+         // send hover event
+         if( _splitter )
+         {
+-            QHoverEvent hoverEvent(
+-                qobject_cast<QSplitterHandle*>(_splitter.data()) ? 
QEvent::HoverLeave : QEvent::HoverMove,
+-                _splitter.data()->mapFromGlobal(QCursor::pos()), _hook);
+-            QCoreApplication::sendEvent( _splitter.data(), &hoverEvent );
++            // SplitterProxy intercepts HoverLeave/HoverMove events to 
_splitter,
++            // but this is meant to reach it directly. Unset _splitter to 
stop interception.
++            auto splitter = _splitter;
+             _splitter.clear();
++            QHoverEvent hoverEvent(
++                qobject_cast<QSplitterHandle*>(splitter.data()) ? 
QEvent::HoverLeave : QEvent::HoverMove,
++                splitter.data()->mapFromGlobal(QCursor::pos()), _hook);
++            QCoreApplication::sendEvent( splitter.data(), &hoverEvent );
+         }
+ 
+         // kill timer if any
+-- 
+GitLab
+

Reply via email to