diff options
Diffstat (limited to 'src/widgets/util/qflickgesture.cpp')
-rw-r--r-- | src/widgets/util/qflickgesture.cpp | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/widgets/util/qflickgesture.cpp b/src/widgets/util/qflickgesture.cpp index a8b2a00a80..14a30ce7cf 100644 --- a/src/widgets/util/qflickgesture.cpp +++ b/src/widgets/util/qflickgesture.cpp @@ -228,7 +228,7 @@ public: // we did send a press, so we need to fake a release now // release all pressed mouse buttons - /* Qt::MouseButtons mouseButtons = QApplication::mouseButtons(); + /* Qt::MouseButtons mouseButtons = QGuiApplication::mouseButtons(); for (int i = 0; i < 32; ++i) { if (mouseButtons & (1 << i)) { Qt::MouseButton b = static_cast<Qt::MouseButton>(1 << i); @@ -237,7 +237,7 @@ public: qFGDebug() << "QFG: sending a fake mouse release at far-far-away to " << mouseTarget; QMouseEvent re(QEvent::MouseButtonRelease, QPoint(), farFarAway, - b, mouseButtons, QApplication::keyboardModifiers()); + b, mouseButtons, QGuiApplication::keyboardModifiers()); sendMouseEvent(&re); } }*/ @@ -246,8 +246,8 @@ public: qFGDebug() << "QFG: sending a fake mouse release at far-far-away to " << mouseTarget; QMouseEvent re(QEvent::MouseButtonRelease, QPoint(), farFarAway, farFarAway, - mouseButton, QApplication::mouseButtons() & ~mouseButton, - QApplication::keyboardModifiers(), mouseEventSource); + mouseButton, QGuiApplication::mouseButtons() & ~mouseButton, + QGuiApplication::keyboardModifiers(), mouseEventSource); sendMouseEvent(&re, RegrabMouseAfterwards); // don't clear the mouseTarget just yet, since we need to explicitly ungrab the mouse on release! } @@ -462,21 +462,6 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state, } break; -#if 0 // Used to be included in Qt4 for Q_WS_MAC - // the only way to distinguish between real mouse wheels and wheel - // events generated by the native 2 finger swipe gesture is to listen - // for these events (according to Apple's Cocoa Event-Handling Guide) - - case QEvent::NativeGesture: { - QNativeGestureEvent *nge = static_cast<QNativeGestureEvent *>(event); - if (nge->gestureType == QNativeGestureEvent::GestureBegin) - d->macIgnoreWheel = true; - else if (nge->gestureType == QNativeGestureEvent::GestureEnd) - d->macIgnoreWheel = false; - break; - } -#endif - // consume all wheel events if the scroller is active case QEvent::Wheel: if (d->macIgnoreWheel || (scroller->state() != QScroller::Inactive)) |