]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/dcmemory.cpp
added assert to check that notebook page does have notebook as parent; removed duplic...
[wxWidgets.git] / src / motif / dcmemory.cpp
index 8694f0b6eccd70854984e0fecd501adf0f9e4702..8ac24c411ea59731dbaed1bc7bb1a79f4e53f49b 100644 (file)
@@ -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
     {