]> git.saurik.com Git - wxWidgets.git/commitdiff
Application clipping region can be set to null without affecting
authorJulian Smart <julian@anthemion.co.uk>
Thu, 2 Mar 2006 12:54:47 +0000 (12:54 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 2 Mar 2006 12:54:47 +0000 (12:54 +0000)
paint clipping region. This fixes severe refresh problems on WinCE
when clipping regions are used, and is experimental on desktop wxMSW
but so far works fine.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dc.cpp

index 62d88bf832011a26790d2983b600683b1db265b0..105d5b75d30b4f3900699fa20487360c079b49f3 100644 (file)
@@ -483,6 +483,14 @@ void wxDC::DestroyClippingRegion()
 
     if (m_clipping && m_hDC)
     {
+#if 1
+        // On a PocketPC device (not necessarily emulator), resetting
+        // the clip region as per the old method causes bad display
+        // problems. In fact setting a null region is probably OK
+        // on desktop WIN32 also, since the WIN32 docs imply that the user
+        // clipping region is independent from the paint clipping region.
+        ::SelectClipRgn(GetHdc(), 0);
+#else        
         // TODO: this should restore the previous clipping region,
         //       so that OnPaint processing works correctly, and the update
         //       clipping region doesn't get destroyed after the first
@@ -490,6 +498,7 @@ void wxDC::DestroyClippingRegion()
         HRGN rgn = CreateRectRgn(0, 0, 32000, 32000);
         ::SelectClipRgn(GetHdc(), rgn);
         ::DeleteObject(rgn);
+#endif        
     }
 
     wxDCBase::DestroyClippingRegion();