X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3a0a5ada86913e591479c1150d23135b0fe5e7e6..5715cc1bed21f3c59dc580f869e4a7c508234598:/src/x11/dcclient.cpp diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp index 5ea0c08e59..1eb072f8aa 100644 --- a/src/x11/dcclient.cpp +++ b/src/x11/dcclient.cpp @@ -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" @@ -313,13 +314,13 @@ void wxWindowDC::DoGetSize( int* width, int* height ) const m_owner->GetSize(width, height); } -extern void wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y, +extern bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y, const wxColour & col, int style); -void wxWindowDC::DoFloodFill(wxCoord x, wxCoord y, +bool wxWindowDC::DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, int style) { - wxDoFloodFill(this, x, y, col, style); + return wxDoFloodFill(this, x, y, col, style); } bool wxWindowDC::DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const @@ -2044,15 +2045,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