From 82e825ed841bce324a6892fcbace03f9936d4f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Luthi?= Date: Wed, 1 Jul 2009 12:03:54 +0200 Subject: Fix tablet events Tablet events should set the qt_button_down, otherwise if the tablet moves onto a widget that does not accept a tablet event, it will set qt_button_down and effectively "grab" the mouse. However, we should only do this if we accept the tablet event. Merge-request: 788 Reviewed-by: Norwegian Rock Cat --- src/gui/kernel/qapplication_mac.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index e7d5a79..04f4cc9 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -1921,6 +1921,11 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event tp, rotation, z, modifiers, deviceData.tabletUniqueID); QApplication::sendSpontaneousEvent(widget, &e); if (e.isAccepted()) { + if (t == QEvent::TabletPress) { + qt_button_down = widget; + } else if (t == QEvent::TabletRelease) { + qt_button_down = 0; + } #if defined(DEBUG_MOUSE_MAPS) qDebug("Bail out early due to tablet acceptance"); #endif -- cgit v0.12