X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2fb0cabbf9e924c25d51b13bf7aa1ba8aa24e75e..7fce89b9441f5a7c885086af6e0d1bf981156c49:/src/x11/dcclient.cpp diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp index 887f6562e3..272cc1dd1a 100644 --- a/src/x11/dcclient.cpp +++ b/src/x11/dcclient.cpp @@ -1185,22 +1185,15 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap, int xscreen = DefaultScreen( xdisplay ); Window xroot = RootWindow( xdisplay, xscreen ); - new_pixmap = XCreatePixmap( xdisplay, xroot, w, h, 1 ); + 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, w, h ); + 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) { @@ -1242,10 +1235,10 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap, // drawing a mono-bitmap (XBitmap) we use the current text GC if (is_mono) XCopyPlane( (Display*) m_display, (Pixmap) use_bitmap.GetBitmap(), (Window) m_window, - (GC) m_textGC, 0, 0, w, h, xx, yy, 1 ); + (GC) m_textGC, 0, 0, ww, hh, xx, yy, 1 ); else XCopyArea( (Display*) m_display, (Pixmap) use_bitmap.GetPixmap(), (Window) m_window, - (GC) m_penGC, 0, 0, w, h, xx, yy ); + (GC) m_penGC, 0, 0, ww, hh, xx, yy ); // remove mask again if any if (setClipMask)