Title: [92799] trunk/Tools
Revision
92799
Author
[email protected]
Date
2011-08-10 14:51:53 -0700 (Wed, 10 Aug 2011)

Log Message

[Qt][WK2] MiniBrowser is firing twice the QDesktopWebView::mousePressEvent method
https://bugs.webkit.org/show_bug.cgi?id=65875

Patch by Benjamin Poulain <[email protected]> on 2011-08-10
Reviewed by Kenneth Rohde Christiansen.

For some reason, QWidget send fake mouse event on some platform, under certains conditions.

This causes mouse events to be sent twice in some cases. We work around the problem
by defining the first touch point to be a primary touch point (case which hit some
weird condition in QWidget, skipping the generation of fake mouse events).

* MiniBrowser/qt/MiniBrowserApplication.cpp:
(MiniBrowserApplication::notify):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (92798 => 92799)


--- trunk/Tools/ChangeLog	2011-08-10 21:48:18 UTC (rev 92798)
+++ trunk/Tools/ChangeLog	2011-08-10 21:51:53 UTC (rev 92799)
@@ -1,3 +1,19 @@
+2011-08-10  Benjamin Poulain  <[email protected]>
+
+        [Qt][WK2] MiniBrowser is firing twice the QDesktopWebView::mousePressEvent method
+        https://bugs.webkit.org/show_bug.cgi?id=65875
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        For some reason, QWidget send fake mouse event on some platform, under certains conditions.
+
+        This causes mouse events to be sent twice in some cases. We work around the problem
+        by defining the first touch point to be a primary touch point (case which hit some
+        weird condition in QWidget, skipping the generation of fake mouse events).
+
+        * MiniBrowser/qt/MiniBrowserApplication.cpp:
+        (MiniBrowserApplication::notify):
+
 2011-08-10  David Hyatt  <[email protected]>
 
         https://bugs.webkit.org/show_bug.cgi?id=66004

Modified: trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp (92798 => 92799)


--- trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp	2011-08-10 21:48:18 UTC (rev 92798)
+++ trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp	2011-08-10 21:51:53 UTC (rev 92799)
@@ -129,8 +129,11 @@
                 it.value().setState(Qt::TouchPointStationary);
         }
 
+        QList<QTouchEvent::TouchPoint> touchPoints = m_touchPoints.values();
+        QTouchEvent::TouchPoint& firstPoint = touchPoints.first();
+        firstPoint.setState(firstPoint.state() | Qt::TouchPointPrimary);
         m_sendingFakeTouchEvent = true;
-        qt_translateRawTouchEvent(0, QTouchEvent::TouchScreen, m_touchPoints.values());
+        qt_translateRawTouchEvent(0, QTouchEvent::TouchScreen, touchPoints);
         m_sendingFakeTouchEvent = false;
 
         // Get rid of touch-points that are no longer valid
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to