Alexandre Julliard : winex11: Don' t set a hint for the small icon if it has the same size as the large one.

Alexandre Julliard julliard at winehq.org
Thu Apr 22 11:24:02 CDT 2010


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Apr 22 14:47:57 2010 +0200

winex11: Don't set a hint for the small icon if it has the same size as the large one.

---

 dlls/winex11.drv/window.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index a9f274f..831b7c9 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -929,7 +929,8 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data,
             unsigned int size_small;
             unsigned long *bits_small, *new;
 
-            if ((bits_small = get_bitmap_argb( hDC, ii.hbmColor, ii.hbmMask, &size_small )))
+            if ((bits_small = get_bitmap_argb( hDC, ii.hbmColor, ii.hbmMask, &size_small )) &&
+                (bits_small[0] != bits[0] || bits_small[1] != bits[1]))  /* size must be different */
             {
                 if ((new = HeapReAlloc( GetProcessHeap(), 0, bits,
                                         (size + size_small) * sizeof(unsigned long) )))
@@ -938,8 +939,8 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data,
                     memcpy( bits + size, bits_small, size_small * sizeof(unsigned long) );
                     size += size_small;
                 }
-                HeapFree( GetProcessHeap(), 0, bits_small );
             }
+            HeapFree( GetProcessHeap(), 0, bits_small );
             DeleteObject( ii.hbmColor );
             DeleteObject( ii.hbmMask );
         }




More information about the wine-cvs mailing list