From: Michael Wetherell Date: Mon, 13 Feb 2006 22:12:33 +0000 (+0000) Subject: Fix for reversed masks on displays with 8-bit depth, reported in patch 1219989. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4077791b7f40b8a1217ac3917e24a7b3b7b28b27 Fix for reversed masks on displays with 8-bit depth, reported in patch 1219989. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp index 033d476bbf..272cc1dd1a 100644 --- a/src/x11/dcclient.cpp +++ b/src/x11/dcclient.cpp @@ -1188,19 +1188,12 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap, new_pixmap = XCreatePixmap( xdisplay, xroot, ww, hh, 1 ); GC gc = XCreateGC( xdisplay, new_pixmap, 0, NULL ); - int bpp = wxTheApp->GetVisualInfo(m_display)->m_visualDepth; - if (bpp == 8) - XSetForeground( xdisplay, gc, WhitePixel(xdisplay,xscreen) ); - else - XSetForeground( xdisplay, gc, BlackPixel(xdisplay,xscreen) ); + XSetForeground( xdisplay, gc, BlackPixel(xdisplay,xscreen) ); XSetFillStyle( xdisplay, gc, FillSolid ); XFillRectangle( xdisplay, new_pixmap, gc, 0, 0, ww, hh ); - if (bpp == 8) - XSetForeground( xdisplay, gc, BlackPixel(xdisplay,xscreen) ); - else - XSetForeground( xdisplay, gc, WhitePixel(xdisplay,xscreen) ); + XSetForeground( xdisplay, gc, WhitePixel(xdisplay,xscreen) ); if (useMask && mask) {