X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47a8a4d5cc3e8fcb2efee4787cb9d244104beea5..893727e58af91fdd8c16ed6236df8bddd96a1342:/src/mac/carbon/window.cpp diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index f66371e586..56d06a2612 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -334,6 +334,9 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl } #endif + if ( thisWindow->MacIsUserPane() ) + result = noErr ; + if ( controlPart == kControlFocusNoPart ) { #if wxUSE_CARET @@ -367,9 +370,6 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl event.SetEventObject(thisWindow); thisWindow->GetEventHandler()->ProcessEvent(event) ; } - - if ( thisWindow->MacIsUserPane() ) - result = noErr ; } break ; @@ -2275,7 +2275,7 @@ void wxWindowMac::GetTextExtent(const wxString& string, int *x, int *y, fontToUse = &m_font; wxClientDC dc( (wxWindowMac*) this ) ; - long lx,ly,ld,le ; + wxCoord lx,ly,ld,le ; dc.GetTextExtent( string , &lx , &ly , &ld, &le, (wxFont *)fontToUse ) ; if ( externalLeading ) *externalLeading = le ; @@ -2610,6 +2610,7 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect) if ( m_peer->GetNeedsDisplay() ) { // because HIViewScrollRect does not scroll the already invalidated area we have two options: + // in case there is already a pending redraw on that area // either immediate redraw or full invalidate #if 1 // is the better overall solution, as it does not slow down scrolling @@ -2630,14 +2631,8 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect) scrollrect.Offset( -MacGetLeftBorderSize() , -MacGetTopBorderSize() ) ; m_peer->ScrollRect( &scrollrect , dx , dy ) ; - // becuase HIViewScrollRect does not scroll the already invalidated area we have two options - // either immediate redraw or full invalidate #if 0 - // is the better overall solution, as it does not slow down scrolling - m_peer->SetNeedsDisplay() ; -#else // this would be the preferred version for fast drawing controls - HIViewRender(m_peer->GetControlRef()) ; #endif } @@ -2662,11 +2657,11 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect) { wxRect rc( x, y, w, h ); if (rect->Intersects( rc )) - child->SetSize( x + dx, y + dy, w, h ); + child->SetSize( x + dx, y + dy, w, h, wxSIZE_AUTO|wxSIZE_ALLOW_MINUS_ONE ); } else { - child->SetSize( x + dx, y + dy, w, h ); + child->SetSize( x + dx, y + dy, w, h, wxSIZE_AUTO|wxSIZE_ALLOW_MINUS_ONE ); } } } @@ -2731,7 +2726,7 @@ void wxWindowMac::OnSetFocus( wxFocusEvent& event ) Rect rect ; m_peer->GetRect( &rect ) ; - // auf den umgebenden Rahmen zurŸck + // auf den umgebenden Rahmen zurÂŸck InsetRect( &rect, -1 , -1 ) ; wxTopLevelWindowMac* top = MacGetTopLevelWindow();