]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 603104 ] wxX11 wxClientDC, wxPaintDC fix
authorJulian Smart <julian@anthemion.co.uk>
Sun, 1 Sep 2002 15:59:22 +0000 (15:59 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 1 Sep 2002 15:59:22 +0000 (15:59 +0000)
This patch changes a pre-compile check to a run-time
check. The fix is that for windows that only using 1 X
window (like wxFrame) the client area needs to be
adjusted...

FL is one of the things that needs this patch to work ok
under wxX11.

Hans Van Leemputten

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

src/x11/dcclient.cpp

index 8693ee3f4c675aee97e5b3863c84c7fe0b7a1e05..81bbf7a9227f96929009846bfb6cb2f4faf4e9f1 100644 (file)
@@ -2046,13 +2046,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