Alexandre Julliard : user32: Don' t try to alpha blend icons on low color bitmaps.

Alexandre Julliard julliard at winehq.org
Fri Dec 16 11:22:54 CST 2011


Module: wine
Branch: master
Commit: 430c8aa9101317777e99a15c4d2c2b97329136e9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=430c8aa9101317777e99a15c4d2c2b97329136e9

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Dec 16 14:20:56 2011 +0100

user32: Don't try to alpha blend icons on low color bitmaps.

---

 dlls/user32/cursoricon.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 4ae7098..d8068d8 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -2288,15 +2288,15 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
 
     if (frame->alpha && (flags & DI_IMAGE))
     {
-        BOOL is_mono = FALSE;
+        BOOL alpha_blend = TRUE;
 
         if (GetObjectType( hdc_dest ) == OBJ_MEMDC)
         {
             BITMAP bm;
             HBITMAP bmp = GetCurrentObject( hdc_dest, OBJ_BITMAP );
-            is_mono = GetObjectW( bmp, sizeof(bm), &bm ) && bm.bmBitsPixel == 1;
+            alpha_blend = GetObjectW( bmp, sizeof(bm), &bm ) && bm.bmBitsPixel > 8;
         }
-        if (!is_mono)
+        if (alpha_blend)
         {
             BLENDFUNCTION pixelblend = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
             SelectObject( hMemDC, frame->alpha );




More information about the wine-cvs mailing list