From e89736135431a54bb6d7c64001c608a42d4dad4a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 20 Oct 2014 22:06:50 +0000 Subject: [PATCH] Revert "Use MaskBlt() with the correct ROP when drawing bitmaps with mask." This reverts r78040 (see #16512) as it broke the appearance of the disabled buttons in MSW toolbars as can be seen in the sample. The change itself might still be correct and could have just uncovered some other bug elsewhere, but for now still revert it just to make the toolbars usable again. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/dc.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 69d55f19b3..c6822f1bb1 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -1430,16 +1430,11 @@ void wxMSWDCImpl::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool ::RealizePalette(hdcMem); } #endif // wxUSE_PALETTE - // Apply mask and source bitmap to the destination bitmap - // (note that we have inverted mask). - // AND mask orig.: 0 1 - // AND mask inv.: 1 0 - // dest. bitmap: 0 XOR src dst XOR src - // =src (src=0 => dst unchanged) + ok = ::MaskBlt(cdc, x, y, width, height, hdcMem, 0, 0, hbmpMask, 0, 0, - MAKEROP4(SRCCOPY, SRCINVERT)) != 0; + MAKEROP4(SRCCOPY, DSTCOPY)) != 0; #if wxUSE_PALETTE if (oldPal)