]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/window.mm
Fix wrong tab order in wxAuiNotebook after dragging.
[wxWidgets.git] / src / osx / cocoa / window.mm
index 166388bf5868572d437780f4bfc99a517b142a3d..5e2a80e53f2baa475e582cc44928583350eca887 100644 (file)
@@ -1149,8 +1149,8 @@ void wxWidgetCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd)
             superimpl(slf, (SEL)_cmd, event);
             
             // super of built-ins keeps the mouse up, as wx expects this event, we have to synthesize it
             superimpl(slf, (SEL)_cmd, event);
             
             // super of built-ins keeps the mouse up, as wx expects this event, we have to synthesize it
-            
-            if ( [ event type]  == NSLeftMouseDown )
+            // only trigger if at this moment the mouse is already up
+            if ( [ event type]  == NSLeftMouseDown && !wxGetMouseState().LeftIsDown() )
             {
                 wxMouseEvent wxevent(wxEVT_LEFT_DOWN);
                 SetupMouseEvent(wxevent , event) ;
             {
                 wxMouseEvent wxevent(wxEVT_LEFT_DOWN);
                 SetupMouseEvent(wxevent , event) ;