From 5d7e624593172a9901d0bb44d57fe6e7697fd113 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Fri, 8 May 2009 15:55:06 +0200 Subject: set qt_tabletChokeMouse to true whenever ANY touch event was accepted this makes sure we always get touch events, and the don't drop out seemingly randomly. --- src/gui/kernel/qapplication_win.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 60c6fd7..723a3b4 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -4175,6 +4175,7 @@ bool QApplicationPrivate::translateTouchEvent(const MSG &msg) return false; bool returnValue = false; + qt_tabletChokeMouse = false; QHash::ConstIterator it = widgetsNeedingEvents.constBegin(); const QHash::ConstIterator end = widgetsNeedingEvents.constEnd(); @@ -4194,7 +4195,7 @@ bool QApplicationPrivate::translateTouchEvent(const MSG &msg) widget->setAttribute(Qt::WA_AcceptedTouchBeginEvent); bool res = QApplication::sendSpontaneousEvent(widget, &touchEvent) && touchEvent.isAccepted(); - returnValue = returnValue || (qt_tabletChokeMouse = res); + returnValue = returnValue || (qt_tabletChokeMouse = qt_tabletChokeMouse || res); break; } case QEvent::TouchEnd: @@ -4206,8 +4207,6 @@ bool QApplicationPrivate::translateTouchEvent(const MSG &msg) if (widget->testAttribute(Qt::WA_AcceptedTouchBeginEvent)) { (void) QApplication::sendSpontaneousEvent(widget, &touchEvent); qt_tabletChokeMouse = true; - } else { - qt_tabletChokeMouse = false; } returnValue = returnValue || qt_tabletChokeMouse; break; -- cgit v0.12