// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "dcmemory.h"
#endif
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
#include "wx/dcmemory.h"
#include "wx/settings.h"
#include "wx/utils.h"
if (m_bitmap.Ok() && (bitmap.GetDisplay() == m_display))
{
- m_pixmap = m_bitmap.GetPixmap();
+ m_pixmap = m_bitmap.GetDrawable();
Display* display = (Display*) m_display;
XGCValues gcvalues;
gcvalues.graphics_exposures = False;
gcvalues.subwindow_mode = IncludeInferiors;
gcvalues.line_width = 1;
- m_gc = (WXGC) XCreateGC (display, RootWindow (display, DefaultScreen (display)),
+ m_gc = (WXGC) XCreateGC (display, (Drawable)m_pixmap/* RootWindow (display, DefaultScreen (display)) */,
GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode,
&gcvalues);
m_backgroundPixel = (int) gcvalues.background;
+ m_ok = TRUE;
// Get the current Font so we can set it back later
XGCValues valReturn;
SetOptimization(oldOpt);
- m_ok = TRUE;
}
else
{