Alexandre Julliard : user32: Draw the mask with SRCCOPY in DrawIcon when the image isn't being drawn.
Alexandre Julliard
julliard at winehq.org
Wed Feb 8 17:45:29 CST 2012
Module: wine
Branch: master
Commit: 8ab65c222e39e4c5cb6ce8ae943c982f93910487
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8ab65c222e39e4c5cb6ce8ae943c982f93910487
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Feb 8 11:00:51 2012 -0600
user32: Draw the mask with SRCCOPY in DrawIcon when the image isn't being drawn.
---
dlls/user32/cursoricon.c | 3 ++-
dlls/user32/tests/cursoricon.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 3a23a47..6002bbb 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -2317,9 +2317,10 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
if (flags & DI_MASK)
{
+ DWORD rop = (flags & DI_IMAGE) ? SRCAND : SRCCOPY;
SelectObject( hMemDC, frame->mask );
StretchBlt( hdc_dest, x, y, cxWidth, cyWidth,
- hMemDC, 0, 0, frame->width, frame->height, SRCAND );
+ hMemDC, 0, 0, frame->width, frame->height, rop );
}
if (flags & DI_IMAGE)
diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c
index 4a570ae..61937e8 100644
--- a/dlls/user32/tests/cursoricon.c
+++ b/dlls/user32/tests/cursoricon.c
@@ -1926,8 +1926,8 @@ static void test_DrawIconEx(void)
check_DrawIconEx(hdcDst, FALSE, 0x00A0B0C0, 32, 0, 0x00102030, 0x00102030, 0x00102030, __LINE__);
check_DrawIconEx(hdcDst, TRUE, 0x00A0B0C0, 32, 0, 0x00102030, 0x00102030, 0x00102030, __LINE__);
- check_DrawIconEx(hdcDst, FALSE, 0x80A0B0C0, 32, DI_MASK, 0x00FFFFFF, 0x00000000, 0x00000000, __LINE__);
- check_DrawIconEx(hdcDst, TRUE, 0x80A0B0C0, 32, DI_MASK, 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, __LINE__);
+ check_DrawIconEx(hdcDst, FALSE, 0x80A0B0C0, 32, DI_MASK, 0x00123456, 0x00000000, 0x00000000, __LINE__);
+ check_DrawIconEx(hdcDst, TRUE, 0x80A0B0C0, 32, DI_MASK, 0x00123456, 0x00FFFFFF, 0x00FFFFFF, __LINE__);
check_DrawIconEx(hdcDst, FALSE, 0x00A0B0C0, 32, DI_IMAGE, 0x00FFFFFF, 0x00C0B0A0, 0x00C0B0A0, __LINE__);
check_DrawIconEx(hdcDst, TRUE, 0x00A0B0C0, 32, DI_IMAGE, 0x00FFFFFF, 0x00C0B0A0, 0x00C0B0A0, __LINE__);
More information about the wine-cvs
mailing list