X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/387ebd3eb755ea6ca076708cfb25fe56249bf787..e37a28a0de36b98a02e03ea11c9a75a38d65ae10:/src/x11/dcclient.cpp diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp index 200762065f..81bbf7a922 100644 --- a/src/x11/dcclient.cpp +++ b/src/x11/dcclient.cpp @@ -2044,15 +2044,16 @@ wxClientDC::wxClientDC( wxWindow *window ) { wxCHECK_RET( window, _T("NULL window in wxClientDC::wxClientDC") ); - m_window = (WXWindow*) window->GetClientWindow(); + 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