X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ff7b1510ea7f7855091df83d75a44415dc1cba18..520e470fdd0daef09c77938db642e4583933c90d:/src/gtk1/dcmemory.cpp diff --git a/src/gtk1/dcmemory.cpp b/src/gtk1/dcmemory.cpp index 78de378ed0..84a6e144e7 100644 --- a/src/gtk1/dcmemory.cpp +++ b/src/gtk1/dcmemory.cpp @@ -14,6 +14,10 @@ #include "wx/dcmemory.h" +#ifdef wxUSE_GDK_IMLIB +#include "../gdk_imlib/gdk_imlib.h" +#endif + //----------------------------------------------------------------------------- // wxMemoryDC //----------------------------------------------------------------------------- @@ -23,13 +27,23 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC) wxMemoryDC::wxMemoryDC(void) { m_ok = FALSE; + +#ifdef wxUSE_GDK_IMLIB + m_cmap = gdk_imlib_get_colormap(); +#else m_cmap = gdk_colormap_get_system(); +#endif } wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) { m_ok = FALSE; + +#ifdef wxUSE_GDK_IMLIB + m_cmap = gdk_imlib_get_colormap(); +#else m_cmap = gdk_colormap_get_system(); +#endif } wxMemoryDC::~wxMemoryDC(void) @@ -57,7 +71,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) else { m_ok = FALSE; - m_window = NULL; + m_window = (GdkWindow *) NULL; } }