Changeset 92799 in webkit


Ignore:
Timestamp:
Aug 10, 2011, 2:51:53 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Benjamin Poulain <benjamin@webkit.org> 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):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r92792 r92799  
     12011-08-10  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        [Qt][WK2] MiniBrowser is firing twice the QDesktopWebView::mousePressEvent method
     4        https://bugs.webkit.org/show_bug.cgi?id=65875
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        For some reason, QWidget send fake mouse event on some platform, under certains conditions.
     9
     10        This causes mouse events to be sent twice in some cases. We work around the problem
     11        by defining the first touch point to be a primary touch point (case which hit some
     12        weird condition in QWidget, skipping the generation of fake mouse events).
     13
     14        * MiniBrowser/qt/MiniBrowserApplication.cpp:
     15        (MiniBrowserApplication::notify):
     16
    1172011-08-10  David Hyatt  <hyatt@apple.com>
    218
  • trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp

    r91667 r92799  
    130130        }
    131131
     132        QList<QTouchEvent::TouchPoint> touchPoints = m_touchPoints.values();
     133        QTouchEvent::TouchPoint& firstPoint = touchPoints.first();
     134        firstPoint.setState(firstPoint.state() | Qt::TouchPointPrimary);
    132135        m_sendingFakeTouchEvent = true;
    133         qt_translateRawTouchEvent(0, QTouchEvent::TouchScreen, m_touchPoints.values());
     136        qt_translateRawTouchEvent(0, QTouchEvent::TouchScreen, touchPoints);
    134137        m_sendingFakeTouchEvent = false;
    135138
Note: See TracChangeset for help on using the changeset viewer.