]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/window.cpp
made it more obvious what to change in case of binary compatibility breakage (but...
[wxWidgets.git] / src / mac / carbon / window.cpp
index 8b6475a926ecb1dac73221d473ea71b5abf7ff1e..b96fabfdcbb666d076ad8ce47b9ba7a629d94fc9 100644 (file)
@@ -76,8 +76,6 @@ extern wxList wxPendingDelete;
     IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
 #endif // __WXUNIVERSAL__/__WXMAC__
 
-#if !USE_SHARED_LIBRARY
-
 BEGIN_EVENT_TABLE(wxWindowMac, wxWindowBase)
     EVT_NC_PAINT(wxWindowMac::OnNcPaint)
     EVT_ERASE_BACKGROUND(wxWindowMac::OnEraseBackground)
@@ -89,8 +87,6 @@ BEGIN_EVENT_TABLE(wxWindowMac, wxWindowBase)
     EVT_MOUSE_EVENTS(wxWindowMac::OnMouseEvent)
 END_EVENT_TABLE()
 
-#endif
-
 #define wxMAC_DEBUG_REDRAW 0
 #ifndef wxMAC_DEBUG_REDRAW
 #define wxMAC_DEBUG_REDRAW 0
@@ -576,6 +572,9 @@ void wxWindowMac::MacControlUserPaneDrawProc(wxInt16 part)
 {
     RgnHandle rgn = NewRgn() ;
     GetClip( rgn ) ;
+    int x = 0 , y = 0;
+    MacWindowToRootWindow( &x,&y ) ;
+    OffsetRgn( rgn , -x , -y ) ;
     wxMacWindowStateSaver sv( this ) ;
     SectRgn( rgn , (RgnHandle) MacGetVisibleRegion().GetWXHRGN() , rgn ) ;
     MacDoRedraw( rgn , 0 ) ;
@@ -2461,7 +2460,7 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect)
                 HIViewRender(m_peer->GetControlRef()) ;
             else
 #endif
-                Update() ;
+                Update() ;                
 
 #endif
        }
@@ -2717,7 +2716,7 @@ void wxWindowMac::ClearBackground()
 void wxWindowMac::Update()
 {
 #if TARGET_API_MAC_OSX
-       MacGetTopLevelWindow()->MacPerformUpdates() ;
+    MacGetTopLevelWindow()->MacPerformUpdates() ;
 #else
     ::Draw1Control( m_peer->GetControlRef() ) ;
 #endif