diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-02-19 15:11:19 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-02-19 16:00:59 (GMT) |
commit | ba9c21f7a1398ddcdeee6f010b1477d79f5bb8ce (patch) | |
tree | e2155e9e4c2e7256e17e7aa4996527ee90f7d1e7 /src | |
parent | d98a1d569533891bb6def33c3233f1ebaf82d9fa (diff) | |
download | Qt-ba9c21f7a1398ddcdeee6f010b1477d79f5bb8ce.zip Qt-ba9c21f7a1398ddcdeee6f010b1477d79f5bb8ce.tar.gz Qt-ba9c21f7a1398ddcdeee6f010b1477d79f5bb8ce.tar.bz2 |
Cocoa: calling QEventLoop::exec from mouse up causes problem
If one create e.g. a modal dialog from a mouse up event handler, we
qt_button_down global variable was pointing to a widget before the
handler returned. This meant that you could not push another button
in the window, since the qt_button_down would grab the mouse. This
patch clears qt_button_down before sending mouse up events.
Reviewed-by: denis
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qt_cocoa_helpers_mac.mm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index b400d25..9702829 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -983,6 +983,7 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev button = Qt::RightButton; [theView qt_setLeftButtonIsRightButton: false]; } + qt_button_down = 0; break; } [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->localPoint = localPoint; |