summaryrefslogtreecommitdiff
path: root/libre/kdebase-runtime-libre/kdebug-324470.patch
blob: 4269df82970bbc62af23c99e3bf0217f2b2d1085 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
commit be1a5d484c70f4f6a383150810afbfbb367db2ac
Author: Eike Hein <hein@kde.org>
Date:   Tue Sep 3 20:29:23 2013 +0200

    Discard the recorded events in the item-local handlers.
    
    Solves problems with identical events being ignored due to
    QGraphicsView's reuse of QGraphicsSceneMouseEvent instances.
    
    CCMAIL:rdieter@fedoraproject.org
    BUG:324470
    BUG:324471

diff --git a/plasma/declarativeimports/qtextracomponents/mouseeventlistener.cpp b/plasma/declarativeimports/qtextracomponents/mouseeventlistener.cpp
index b534845..36530e0 100644
--- a/plasma/declarativeimports/qtextracomponents/mouseeventlistener.cpp
+++ b/plasma/declarativeimports/qtextracomponents/mouseeventlistener.cpp
@@ -90,6 +90,7 @@ bool MouseEventListener::containsMouse() const
 void MouseEventListener::mousePressEvent(QGraphicsSceneMouseEvent *me)
 {
     if (m_lastEvent == me) {
+        m_lastEvent = 0;
         return;
     }
 
@@ -112,6 +113,7 @@ void MouseEventListener::mousePressEvent(QGraphicsSceneMouseEvent *me)
 void MouseEventListener::mouseMoveEvent(QGraphicsSceneMouseEvent *me)
 {
     if (m_lastEvent == me) {
+        m_lastEvent = 0;
         return;
     }
 
@@ -122,6 +124,7 @@ void MouseEventListener::mouseMoveEvent(QGraphicsSceneMouseEvent *me)
 void MouseEventListener::mouseReleaseEvent(QGraphicsSceneMouseEvent *me)
 {
     if (m_lastEvent == me) {
+        m_lastEvent = 0;
         return;
     }
 
@@ -138,6 +141,7 @@ void MouseEventListener::mouseReleaseEvent(QGraphicsSceneMouseEvent *me)
 void MouseEventListener::wheelEvent(QGraphicsSceneWheelEvent *we)
 {
     if (m_lastEvent == we) {
+        m_lastEvent = 0;
         return;
     }