SHA256
1
0
forked from pool/breeze

Accepting request 895892 from home:Vogtinator:plasma5.22

- Add patch to fix misbehaving cursor after passing splitters (kde#436473):
  * 0001-Fix-informing-the-underlying-widget-when-leaving-Spl.patch

OBS-URL: https://build.opensuse.org/request/show/895892
OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/breeze?expand=0&rev=336
This commit is contained in:
Christophe Giboudeaux 2021-05-28 12:31:01 +00:00 committed by Git OBS Bridge
parent 5c928152d9
commit 4aecc072df
3 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,51 @@
From 96eecd246771bf9db425e9be758401494d4d2131 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
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
(cherry picked from commit f99b7ef621c9c69544158d245699fd8104db6753)
---
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
--
2.25.1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri May 28 06:47:58 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>
- Add patch to fix misbehaving cursor after passing splitters (kde#436473):
* 0001-Fix-informing-the-underlying-widget-when-leaving-Spl.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu May 13 18:15:27 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de> Thu May 13 18:15:27 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>

View File

@ -33,6 +33,8 @@ Source: https://download.kde.org/unstable/plasma/%{version}/breeze-%{ver
Source1: https://download.kde.org/unstable/plasma/%{version}/breeze-%{version}.tar.xz.sig Source1: https://download.kde.org/unstable/plasma/%{version}/breeze-%{version}.tar.xz.sig
Source2: plasma.keyring Source2: plasma.keyring
%endif %endif
# PATCH-FIX-UPSTREAM
Patch1: 0001-Fix-informing-the-underlying-widget-when-leaving-Spl.patch
BuildRequires: cmake >= 3.16 BuildRequires: cmake >= 3.16
BuildRequires: extra-cmake-modules >= 0.0.13 BuildRequires: extra-cmake-modules >= 0.0.13
BuildRequires: fdupes BuildRequires: fdupes