]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/statbmp.cpp
assert is raised when using the thread sample (which works) so the test is
[wxWidgets.git] / src / motif / statbmp.cpp
index e0d2ac766ee4578c0faa08eb1ddff6b70fca8fa7..c10ac0d74ae47a2031cf7c5cd5a2cfec71f5017f 100644 (file)
@@ -75,8 +75,6 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
     m_font = parent->GetFont();
     ChangeFont(FALSE);
 
-    SetCanAddEventHandler(TRUE);
-
     wxSize actualSize(size);
     // work around the cases where the bitmap is a wxNull(Icon/Bitmap)
     if (actualSize.x == -1)
@@ -121,10 +119,13 @@ void wxStaticBitmap::DoSetBitmap()
             wxBitmap newBitmap = wxCreateMaskedBitmap(m_messageBitmapOriginal, col);
             m_messageBitmap = newBitmap;
 
-            pixmap = (Pixmap) m_messageBitmap.GetPixmap();
+            pixmap = (Pixmap) m_messageBitmap.GetDrawable();
         }
         else
-            pixmap = (Pixmap) m_messageBitmap.GetLabelPixmap(widget);
+        {
+            m_bitmapCache.SetBitmap( m_messageBitmap );
+            pixmap = (Pixmap)m_bitmapCache.GetLabelPixmap(widget);
+        }
 
         XtVaSetValues (widget,
             XmNlabelPixmap, pixmap,
@@ -164,11 +165,13 @@ void wxStaticBitmap::ChangeBackgroundColour()
     wxWindow::ChangeBackgroundColour();
 
     // must recalculate the background colour
+    m_bitmapCache.SetColoursChanged();
     DoSetBitmap();
 }
 
 void wxStaticBitmap::ChangeForegroundColour()
 {
+    m_bitmapCache.SetColoursChanged();
     wxWindow::ChangeForegroundColour();
 }