X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a756f210019dd5b51331b7181c816d3882146a30..ae177b45b258b4985ee8c9ce7848bcb4f1266f80:/src/motif/dcmemory.cpp diff --git a/src/motif/dcmemory.cpp b/src/motif/dcmemory.cpp index 8694f0b6ec..ce07b8fdd8 100644 --- a/src/motif/dcmemory.cpp +++ b/src/motif/dcmemory.cpp @@ -9,10 +9,13 @@ // 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" @@ -105,7 +108,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) 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; @@ -114,11 +117,12 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) 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; @@ -133,7 +137,6 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) SetOptimization(oldOpt); - m_ok = TRUE; } else {