#include "wx/window.h"
#include "wx/app.h"
#include "wx/image.h"
+#include "wx/module.h"
#include "wx/x11/private.h"
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
{
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