X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ab38025228005fd3d5b43b641c825806ac9abbc..ab67e8874db324fab5223cc8d5dff8a8de3e2b77:/src/osx/cocoa/window.mm?ds=inline diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 3cf01f4de0..5e2a80e53f 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 && !wxGetMouseState().LeftIsDown() ) { wxMouseEvent wxevent(wxEVT_LEFT_DOWN); SetupMouseEvent(wxevent , event) ; @@ -1438,7 +1438,10 @@ void wxWidgetCocoaImpl::controlAction( WXWidget WXUNUSED(slf), void *WXUNUSED(_c { wxWindow* wxpeer = (wxWindow*) GetWXPeer(); if ( wxpeer ) + { + wxpeer->OSXSimulateFocusEvents(); wxpeer->OSXHandleClicked(0); + } } void wxWidgetCocoaImpl::controlDoubleAction( WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd), void *WXUNUSED(sender)) @@ -2125,6 +2128,9 @@ void wxWidgetCocoaImpl::Embed( wxWidgetImpl *parent ) NSView* container = parent->GetWXWidget() ; wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ; [container addSubview:m_osxView]; + + if( m_wxPeer->IsFrozen() ) + [[m_osxView window] disableFlushWindow]; } void wxWidgetCocoaImpl::SetBackgroundColour( const wxColour &col ) @@ -2537,7 +2543,7 @@ void wxWidgetCocoaImpl::DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* oth event.SetWindow(otherWindow->GetWXPeer()); thisWindow->HandleWindowEvent(event) ; } - else // !receivedFocuss + else // !receivedFocus { #if wxUSE_CARET if ( thisWindow->GetCaret() )