From 7948c0c24401c496c04da3c28f1f1f2f282ba327 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 1 Sep 2002 15:59:22 +0000 Subject: [PATCH] Applied patch [ 603104 ] wxX11 wxClientDC, wxPaintDC fix 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp index 8693ee3f4c..81bbf7a922 100644 --- a/src/x11/dcclient.cpp +++ b/src/x11/dcclient.cpp @@ -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 -- 2.45.2