Commit 09dc6019 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 9ff982f2
...@@ -929,7 +929,8 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data, ...@@ -929,7 +929,8 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data,
unsigned int size_small; unsigned int size_small;
unsigned long *bits_small, *new; 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, if ((new = HeapReAlloc( GetProcessHeap(), 0, bits,
(size + size_small) * sizeof(unsigned long) ))) (size + size_small) * sizeof(unsigned long) )))
...@@ -938,8 +939,8 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data, ...@@ -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) ); memcpy( bits + size, bits_small, size_small * sizeof(unsigned long) );
size += size_small; size += size_small;
} }
HeapFree( GetProcessHeap(), 0, bits_small );
} }
HeapFree( GetProcessHeap(), 0, bits_small );
DeleteObject( ii.hbmColor ); DeleteObject( ii.hbmColor );
DeleteObject( ii.hbmMask ); DeleteObject( ii.hbmMask );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment