X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2a1f999fafa4312ccd47b7be65c672c2220fea36..bab3f3eac44fdc682febe918b3b50250e1991dec:/src/mac/carbon/toplevel.cpp diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 32b4831f14..0723699637 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -308,6 +308,10 @@ static void SetupMouseEvent( wxMouseEvent &wxevent , wxMacCarbonEvent &cEvent ) button = kEventMouseButtonSecondary ; } + // otherwise we report double clicks by connecting a left click with a ctrl-left click + if ( clickCount > 1 && button != lastButton ) + clickCount = 1 ; + // we must make sure that our synthetic 'right' button corresponds in // mouse down, moved and mouse up, and does not deliver a right down and left up @@ -711,6 +715,7 @@ static pascal OSStatus wxMacTopLevelWindowEventHandler( EventHandlerCallRef hand event.SetEventObject( toplevelWindow ) ; toplevelWindow->GetEventHandler()->ProcessEvent(event) ; + toplevelWindow->wxWindowMac::MacSuperChangedPosition() ; // like this only children will be notified } if ( attributes & kWindowBoundsChangeOriginChanged ) { @@ -751,6 +756,7 @@ static pascal OSStatus wxMacTopLevelWindowEventHandler( EventHandlerCallRef hand const Rect adjustedRect = { adjustR.y + top , adjustR.x + left , adjustR.y + adjustR.height - bottom , adjustR.x + adjustR.width - right } ; if ( !EqualRect( &newRect , &adjustedRect ) ) cEvent.SetParameter( kEventParamCurrentBounds , &adjustedRect ) ; + toplevelWindow->wxWindowMac::MacSuperChangedPosition() ; // like this only children will be notified } result = noErr ; @@ -1197,6 +1203,8 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title, InstallStandardEventHandler( GetWindowEventTarget(MAC_WXHWND(m_macWindow)) ) ; MacInstallTopLevelWindowEventHandler() ; + DoSetWindowVariant( m_windowVariant ) ; + m_macFocus = NULL ; if ( HasFlag(wxFRAME_SHAPED) ) @@ -1378,8 +1386,10 @@ void wxTopLevelWindowMac::MacGetContentAreaInset( int &left , int &top , int &ri void wxTopLevelWindowMac::DoMoveWindow(int x, int y, int width, int height) { + m_cachedClippedRectValid = false ; Rect bounds = { y , x , y + height , x + width } ; verify_noerr(SetWindowBounds( (WindowRef) m_macWindow, kWindowStructureRgn , &bounds )) ; + wxWindowMac::MacSuperChangedPosition() ; // like this only children will be notified } void wxTopLevelWindowMac::DoGetPosition( int *x, int *y ) const