X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a756f210019dd5b51331b7181c816d3882146a30..1020103f16649373e73561004099dac972747c91:/src/motif/dcmemory.cpp diff --git a/src/motif/dcmemory.cpp b/src/motif/dcmemory.cpp index 8694f0b6ec..451576cf5e 100644 --- a/src/motif/dcmemory.cpp +++ b/src/motif/dcmemory.cpp @@ -105,7 +105,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 +114,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 +134,6 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) SetOptimization(oldOpt); - m_ok = TRUE; } else {