X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/422644a3173c7309f1b67f138ed6cdfeaa24ddf1..ff143598418fd629bb08e22d2f46bc8be6dddfc1:/src/mac/toplevel.cpp?ds=sidebyside diff --git a/src/mac/toplevel.cpp b/src/mac/toplevel.cpp index 296aa8dfe0..8c84e811e0 100644 --- a/src/mac/toplevel.cpp +++ b/src/mac/toplevel.cpp @@ -40,6 +40,12 @@ #include "wx/mac/uma.h" #include "wx/mac/aga.h" #include "wx/tooltip.h" +#include "wx/dnd.h" + +#define wxMAC_DEBUG_REDRAW 0 +#ifndef wxMAC_DEBUG_REDRAW +#define wxMAC_DEBUG_REDRAW 0 +#endif // ---------------------------------------------------------------------------- // globals @@ -274,18 +280,6 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title, m_macFocus = NULL ; } -void wxTopLevelWindowMac::MacDoGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin ) -{ - localOrigin->h = 0; - localOrigin->v = 0; - clipRect->left = 0; - clipRect->top = 0; - clipRect->right = m_width ;//width; - clipRect->bottom = m_height ;// height; - *window = m_macWindow ; - *rootwin = this ; -} - void wxTopLevelWindowMac::MacGetPortParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin) { localOrigin->h = 0; @@ -300,13 +294,7 @@ void wxTopLevelWindowMac::MacGetPortParams(Point* localOrigin, Rect* clipRect, W void wxTopLevelWindowMac::Clear() { - wxMacDrawingClientHelper helper ( this ) ; - int w ,h ; - wxPoint origin = GetClientAreaOrigin() ; - GetClientSize( &w , &h ) ; - ::SetThemeWindowBackground( m_macWindow , m_macWindowBackgroundTheme , false ) ; - Rect r = { origin.y , origin.x, origin.y+h , origin.x+w } ; - EraseRect( &r ) ; + wxWindow::Clear() ; } ControlHandle wxTopLevelWindowMac::MacGetContainerForEmbedding() @@ -322,7 +310,6 @@ void wxTopLevelWindowMac::MacUpdate( long timestamp) #else AGAPortHelper help( (m_macWindow) ) ; #endif - SetOrigin( 0 , 0 ) ; BeginUpdate( m_macWindow ) ; RgnHandle updateRgn = NewRgn(); @@ -500,9 +487,7 @@ void wxTopLevelWindowMac::MacActivate( EventRecord *ev , bool inIsActivating ) UMAHighlightAndActivateWindow( m_macWindow , inIsActivating ) ; - Refresh( FALSE ) ; -// MacSuperEnabled( inIsActivating ) ; -// MacUpdateImmediately() ; + MacSuperEnabled( inIsActivating ) ; } void wxTopLevelWindowMac::MacKeyDown( EventRecord *ev ) @@ -691,8 +676,9 @@ void wxTopLevelWindowMac::MacInvalidate( const Rect * rect, bool eraseBackground } InvalWindowRect( m_macWindow , rect ) ; // turn this on to debug the refreshing cycle -#if 0 +#if wxMAC_DEBUG_REDRAW PaintRect( rect ) ; #endif SetPort( formerPort ) ; } +