]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dcmemory.cpp
set mask when converting pixbuf to pixmap
[wxWidgets.git] / src / gtk / dcmemory.cpp
index 3c843eae1d342557848118e6f5ee998248d8e703..a3ac365287797b80972362e05d9bf963a554e360 100644 (file)
@@ -7,10 +7,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 <gdk/gdk.h>
@@ -68,6 +71,10 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
             m_window = m_selected.GetBitmap();
         }
 
+#ifdef __WXGTK20__
+        m_selected.PurgeOtherRepresentations(wxBitmap::Pixmap);
+#endif
+
         m_isMemDC = TRUE;
 
         SetUpDC();