From: Stefan Csomor Date: Fri, 14 Dec 2012 10:42:06 +0000 (+0000) Subject: avoid double up events for static text, fixes #14902 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4ca0bca0f31652f0b27209e97eecac0fb99c2adf?ds=inline avoid double up events for static text, fixes #14902 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 166388bf58..07cdeee8a0 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -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 - - if ( [ event type] == NSLeftMouseDown ) + // only trigger if at this moment the mouse is already up + if ( [ event type] == NSLeftMouseDown && !( [NSEvent pressedMouseButtons] & 0x01) ) { wxMouseEvent wxevent(wxEVT_LEFT_DOWN); SetupMouseEvent(wxevent , event) ;