X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a4294b7832a5aed3c1cccc06aecd227d43da8830..a5e13868ca700aa39bae26b8fb13c640f466d9f0:/src/motif/dcclient.cpp diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp index 8054aec456..6ab2bd156a 100644 --- a/src/motif/dcclient.cpp +++ b/src/motif/dcclient.cpp @@ -1855,7 +1855,9 @@ void wxWindowDC::SetBackground( const wxBrush &brush ) int pixel = m_backgroundBrush.GetColour().AllocColour(m_display); - XSetWindowBackground ((Display*) m_display, (Pixmap) m_pixmap, pixel); + // XSetWindowBackground doesn't work for non-Window pixmaps + if (!this->IsKindOf(CLASSINFO(wxMemoryDC))) + XSetWindowBackground ((Display*) m_display, (Pixmap) m_pixmap, pixel); // Necessary for ::DrawIcon, which use fg/bg pixel or the GC. // And Blit,... (Any fct that use XCopyPlane, in fact.)