]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/utilsx.cpp
use the right GdkWindow and origin for non-pizza widget with wxClientDC
[wxWidgets.git] / src / x11 / utilsx.cpp
index 27eb3c2725867a1ce771d4da5719873de6ead3cf..a635f8f7e816cb8ae0209c9677a3872e76e313b6 100644 (file)
 
 #ifdef __VMS
 #define XShapeQueryExtension XSHAPEQUERYEXTENSION
-#define XtDisplay XTDISPLAY
 #endif
 
 #include "wx/x11/privx.h"
 
 #ifdef HAVE_XSHAPE
-#ifdef __VMS
-# include "wx/vms_x_fix.h"
-# include <X11/shape.h>
-#else
-# include <X11/extensions/shape.h>
-#endif
-#include "wx/region.h"
-#include "wx/bitmap.h"
-#include "wx/dcmemory.h"
+
+    #ifndef WX_PRECOMP
+        #include "wx/bitmap.h"
+        #include "wx/region.h"
+    #endif
+
+    #ifdef __VMS
+        #include "wx/vms_x_fix.h"
+        #include <X11/shape.h>
+    #else
+        #include <X11/extensions/shape.h>
+    #endif
+
+    #include "wx/dcmemory.h"
 #endif
 
 // ----------------------------------------------------------------------------
@@ -54,14 +58,14 @@ bool wxDoSetShape( Display* xdisplay,
     else
     {
         // wxRegion::ConvertToBitmap gives us the wrong Pixmap:
-        // polichrome and with black and whire reversed
+        // polychrome and with black and white reversed
         wxRect box = region.GetBox();
         wxBitmap bmp(box.GetRight(), box.GetBottom(), 1);
         wxMemoryDC dc;
         dc.SelectObject(bmp);
         dc.SetBackground(*wxBLACK_BRUSH);
         dc.Clear();
-        dc.SetClippingRegion(region);
+        dc.SetDeviceClippingRegion(region);
         dc.SetBackground(*wxWHITE_BRUSH);
         dc.Clear();
         dc.SelectObject(wxNullBitmap);