[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-active
Subject:    [plasma-mobile] components: partial workaround to the popups eating
From:       notmart () gmail ! com (Marco Martin)
Date:       2011-09-07 19:26:51
Message-ID: 20110907192651.8445EA60A6 () git ! kde ! org
[Download RAW message or body]

Git commit 6d9a9f211c7307434940d5b9bc74293fcf35a73c by Marco Martin.
Committed on 07/09/2011 at 21:21.
Pushed by mart into branch 'master'.

partial workaround to the popups eating events

when a popup window is visible: a click anywhere hides it: but the old \
qgraphicswidget will continue to think it's under the mouse doesn't seem to be any \
good way to properly reset this. this msolution will still caused a missed click \
after the popup is gone, but gets the situation unblocked.

anybody has a better idea on this?
CCMAIL:active at kde.org

M  +8    -0    components/mouseeventlistener.cpp

http://commits.kde.org/plasma-mobile/6d9a9f211c7307434940d5b9bc74293fcf35a73c

diff --git a/components/mouseeventlistener.cpp b/components/mouseeventlistener.cpp
index 00f95b9..bf24e71 100644
--- a/components/mouseeventlistener.cpp
+++ b/components/mouseeventlistener.cpp
@@ -37,6 +37,14 @@ MouseEventListener::~MouseEventListener()
 
 void MouseEventListener::mousePressEvent(QGraphicsSceneMouseEvent *me)
 {
+    //FIXME: when a popup window is visible: a click anywhere hides it: but the old \
qgraphicswidget will continue to think it's under the mouse +    //doesn't seem to be \
any good way to properly reset this. +    //this msolution will still caused a missed \
click after the popup is gone, but gets the situation unblocked. +    if \
(!isUnderMouse()) { +        me->ignore();
+        return;
+    }
+
     QDeclarativeMouseEvent dme(me->pos().x(), me->pos().y(), me->screenPos().x(), \
me->screenPos().y(), me->button(), me->buttons(), me->modifiers());  emit \
pressed(&dme);  }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic