diff options
author | Cédric Luthi <cluthi@sente.ch> | 2009-07-01 10:03:54 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-07-01 10:07:13 (GMT) |
commit | 82e825ed841bce324a6892fcbace03f9936d4f4f (patch) | |
tree | 9c159d6efe97d0d457d6fe553547ccae370c283d /src/gui/kernel/qapplication_mac.mm | |
parent | 8a8c9a2f668bedc7dd7ecf1f4f025a1587ca9fc1 (diff) | |
download | Qt-82e825ed841bce324a6892fcbace03f9936d4f4f.zip Qt-82e825ed841bce324a6892fcbace03f9936d4f4f.tar.gz Qt-82e825ed841bce324a6892fcbace03f9936d4f4f.tar.bz2 |
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 <qt-info@nokia.com>
Diffstat (limited to 'src/gui/kernel/qapplication_mac.mm')
-rw-r--r-- | src/gui/kernel/qapplication_mac.mm | 5 |
1 files changed, 5 insertions, 0 deletions
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 |