]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/dcclient.cpp
merged deleted code back
[wxWidgets.git] / src / x11 / dcclient.cpp
index 8693ee3f4c675aee97e5b3863c84c7fe0b7a1e05..1eb072f8aa789a1d34693ad38170c8bd10d0b57b 100644 (file)
@@ -18,6 +18,7 @@
 #include "wx/window.h"
 #include "wx/app.h"
 #include "wx/image.h"
+#include "wx/module.h"
 
 #include "wx/x11/private.h"
 
@@ -2046,13 +2047,14 @@ wxClientDC::wxClientDC( wxWindow *window )
     
     m_window = (WXWindow*) window->GetClientAreaWindow();
     
-#if wxUSE_TWO_WINDOWS
-#else
+    // Adjust the client area when the wxWindow is not using 2 X windows.
+    if (m_window == (WXWindow*) window->GetMainWindow())
+    {
         wxPoint ptOrigin = window->GetClientAreaOrigin();
         SetDeviceOrigin(ptOrigin.x, ptOrigin.y);
         wxSize size = window->GetClientSize();
         SetClippingRegion(wxPoint(0, 0), size);
-#endif
+    }
 }
 
 void wxClientDC::DoGetSize(int *width, int *height) const