]> git.saurik.com Git - wxWidgets.git/commitdiff
corrected the invalidation when resizing windows (was only invalidating the client...
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 27 Feb 2001 23:21:48 +0000 (23:21 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 27 Feb 2001 23:21:48 +0000 (23:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp
src/mac/window.cpp

index 989141e74c63d9140bd6a23cfecc9a14a346b0d6..6aa38ca851694ac1760d6fe557e887c65e4d3535 100644 (file)
@@ -564,13 +564,12 @@ void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
                else
                {
                        // erase former position
+                       wxMacDrawingHelper focus( this ) ;
+                       if ( focus.Ok() )
                        {
-                               wxMacDrawingClientHelper focus( this ) ;
-                               if ( focus.Ok() )
-                               {
-                               Rect clientrect = { 0 , 0 , m_height , m_width } ;
-                           InvalWindowRect( GetMacRootWindow() , &clientrect ) ;
-                               }
+                               Rect clientrect = { 0 , 0 , m_height , m_width } ;
+                               ClipRect( &clientrect ) ;
+                       InvalWindowRect( GetMacRootWindow() , &clientrect ) ;
                        }
                }
                m_x = actualX ;
@@ -597,14 +596,17 @@ void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
                else
                {
                        // erase new position
+                       
                        {
-                               wxMacDrawingClientHelper focus( this ) ;
+                               wxMacDrawingHelper focus( this ) ;
                                if ( focus.Ok() )
                                {
                                        Rect clientrect = { 0 , 0 , m_height , m_width } ;
+                                       ClipRect( &clientrect ) ;
                                InvalWindowRect( GetMacRootWindow() , &clientrect ) ;
                                }
                        }
+                       
                        if ( doMove )
                                wxWindow::MacSuperChangedPosition() ; // like this only children will be notified
                }
index 989141e74c63d9140bd6a23cfecc9a14a346b0d6..6aa38ca851694ac1760d6fe557e887c65e4d3535 100644 (file)
@@ -564,13 +564,12 @@ void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
                else
                {
                        // erase former position
+                       wxMacDrawingHelper focus( this ) ;
+                       if ( focus.Ok() )
                        {
-                               wxMacDrawingClientHelper focus( this ) ;
-                               if ( focus.Ok() )
-                               {
-                               Rect clientrect = { 0 , 0 , m_height , m_width } ;
-                           InvalWindowRect( GetMacRootWindow() , &clientrect ) ;
-                               }
+                               Rect clientrect = { 0 , 0 , m_height , m_width } ;
+                               ClipRect( &clientrect ) ;
+                       InvalWindowRect( GetMacRootWindow() , &clientrect ) ;
                        }
                }
                m_x = actualX ;
@@ -597,14 +596,17 @@ void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
                else
                {
                        // erase new position
+                       
                        {
-                               wxMacDrawingClientHelper focus( this ) ;
+                               wxMacDrawingHelper focus( this ) ;
                                if ( focus.Ok() )
                                {
                                        Rect clientrect = { 0 , 0 , m_height , m_width } ;
+                                       ClipRect( &clientrect ) ;
                                InvalWindowRect( GetMacRootWindow() , &clientrect ) ;
                                }
                        }
+                       
                        if ( doMove )
                                wxWindow::MacSuperChangedPosition() ; // like this only children will be notified
                }