Proper upstream for fox KDE#354651

epel9
Dan Vrátil 9 years ago
parent 542b1e5d42
commit 91f8547073

@ -0,0 +1,54 @@
diff --git a/shell/panelview.cpp b/shell/panelview.cpp
index 063343d..893def0 100644
--- a/shell/panelview.cpp
+++ b/shell/panelview.cpp
@@ -748,7 +748,6 @@ bool PanelView::event(QEvent *e)
* on the mouse edge, forward the click in the containment boundaries
*/
switch (e->type()) {
- case QEvent::Enter:
case QEvent::MouseMove:
case QEvent::MouseButtonPress:
case QEvent::MouseButtonRelease: {
@@ -756,7 +755,7 @@ bool PanelView::event(QEvent *e)
//first, don't mess with position if the cursor is actually outside the view:
//somebody is doing a click and drag that must not break when the cursor i outside
- if (geometry().contains(me->screenPos().toPoint())) {
+ if (geometry().contains(QCursor::pos())) {
if (!containmentContainsPosition(me->windowPos())) {
auto me2 = new QMouseEvent(me->type(),
positionAdjustedForContainment(me->windowPos()),
@@ -767,25 +766,19 @@ bool PanelView::event(QEvent *e)
QCoreApplication::postEvent(this, me2);
return true;
}
- }
- break;
- }
- case QEvent::Leave: {
- QMouseEvent *me = static_cast<QMouseEvent *>(e);
- // don't forget to trigger QEvent::Leave if current mouse position is outside the panel
- if (!geometry().contains(me->screenPos().toPoint())) {
- auto me2 = new QMouseEvent(QEvent::Leave,
- positionAdjustedForContainment(me->windowPos()),
- positionAdjustedForContainment(me->windowPos()),
- positionAdjustedForContainment(me->windowPos()) + position(),
- me->button(), me->buttons(), me->modifiers());
-
- QCoreApplication::postEvent(this, me2);
+ } else {
+ // discard event if current mouse position is outside the panel
return true;
}
break;
}
+ case QEvent::Enter:
+ case QEvent::Leave:
+ // QtQuick < 5.6 issue:
+ // QEvent::Leave is triggered on MouseButtonPress Qt::LeftButton
+ break;
+
case QEvent::Wheel: {
QWheelEvent *we = static_cast<QWheelEvent *>(e);

@ -1,54 +0,0 @@
From 76cb47f1279ea012a9eda11c4ead7f28db4c1399 Mon Sep 17 00:00:00 2001
From: Anthony Fieroni <bvbfan@abv.bg>
Date: Tue, 1 Dec 2015 09:27:15 +0000
Subject: [PATCH 01/15] Forward mouse enter and leave events on feathered edges
REVIEW: 126175
BUG: 354651
---
shell/panelview.cpp | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/shell/panelview.cpp b/shell/panelview.cpp
index 3407501..28faac4 100644
--- a/shell/panelview.cpp
+++ b/shell/panelview.cpp
@@ -748,6 +748,7 @@ bool PanelView::event(QEvent *e)
* on the mouse edge, forward the click in the containment boundaries
*/
switch (e->type()) {
+ case QEvent::Enter:
case QEvent::MouseMove:
case QEvent::MouseButtonPress:
case QEvent::MouseButtonRelease: {
@@ -755,8 +756,25 @@ bool PanelView::event(QEvent *e)
//first, don't mess with position if the cursor is actually outside the view:
//somebody is doing a click and drag that must not break when the cursor i outside
- if (geometry().contains(me->screenPos().toPoint()) && !containmentContainsPosition(me->windowPos())) {
- auto me2 = new QMouseEvent(me->type(),
+ if (geometry().contains(me->screenPos().toPoint())) {
+ if (!containmentContainsPosition(me->windowPos())) {
+ auto me2 = new QMouseEvent(me->type(),
+ positionAdjustedForContainment(me->windowPos()),
+ positionAdjustedForContainment(me->windowPos()),
+ positionAdjustedForContainment(me->windowPos()) + position(),
+ me->button(), me->buttons(), me->modifiers());
+
+ QCoreApplication::postEvent(this, me2);
+ return true;
+ }
+ }
+ break;
+ }
+ case QEvent::Leave: {
+ QMouseEvent *me = static_cast<QMouseEvent *>(e);
+ // don't forget to trigger QEvent::Leave if current mouse position is outside the panel
+ if (!geometry().contains(me->screenPos().toPoint())) {
+ auto me2 = new QMouseEvent(QEvent::Leave,
positionAdjustedForContainment(me->windowPos()),
positionAdjustedForContainment(me->windowPos()),
positionAdjustedForContainment(me->windowPos()) + position(),
--
2.5.0

@ -11,7 +11,7 @@
Name: plasma-workspace
Summary: Plasma workspace, applications and applets
Version: 5.5.0
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2+
URL: https://projects.kde.org/projects/kde/workspace/plasma-workspace
@ -53,10 +53,7 @@ Patch107: 0007-If-the-user-runs-failsafe-mode-use-software-renderin.patch
Patch108: 0008-Clipboard-Plasmoid-Fix-import-to-use-StandardKey.patch
Patch109: 0009-System-Tray-Explicitly-forward-key-events-to-expande.patch
Patch110: 0010-Mitigate-failed-icon-grabbing-in-xembed-sni-proxy.patch
# revert this one
Patch150: Forward-mouse-enter-and-leave-events-on-feathered-ed.patch
Patch111: 0011-Left-click-on-item-in-task-manager-is-ignored-abritr.patch
## master branch Patches
@ -365,9 +362,7 @@ Requires: qt5-qtwayland%{?_isa}
%patch108 -p1 -b .0008
%patch109 -p1 -b .0009
%patch110 -p1 -b .0010
# revert
%patch150 -p1 -R -b .kde356415
%patch111 -p1 -b .0011
%patch1 -p1 -b .installdbgsymbols
%patch10 -p1 -b .konsole-in-contextmenu
@ -593,6 +588,9 @@ fi
%changelog
* Mon Dec 14 2015 Daniel Vrátil <dvratil@fedoraproject.org> - 5.5.0-4
- proper upstream fix for #356415 (review #126331)
* Sun Dec 13 2015 Rex Dieter <rdieter@fedoraproject.org> - 5.5.0-3
- latest upstream fixes (#1291100)
- revert commit causing regression'ish kde #356415

Loading…
Cancel
Save