ptr = bits + 2;
for (i = 0; i < bm.bmHeight; i++)
for (j = 0; j < bm.bmWidth; j++, ptr++)
- if ((mask_bits[i * width_bytes + j / 8] << (j % 8)) & 0x80) *ptr |= 0xff000000;
+ if (!((mask_bits[i * width_bytes + j / 8] << (j % 8)) & 0x80)) *ptr |= 0xff000000;
HeapFree( GetProcessHeap(), 0, mask_bits );
}
HeapFree( GetProcessHeap(), 0, info );
rcMask.bottom = bm.bmHeight;
hDC = CreateCompatibleDC(0);
- hbmOrig = SelectObject(hDC, ii.hbmMask);
- InvertRect(hDC, &rcMask);
- SelectObject(hDC, ii.hbmColor); /* force the color bitmap to x11drv mode too */
- SelectObject(hDC, hbmOrig);
-
- data->hWMIconBitmap = ii.hbmColor;
- data->hWMIconMask = ii.hbmMask;
-
- hints->icon_pixmap = X11DRV_get_pixmap(data->hWMIconBitmap);
- hints->icon_mask = X11DRV_get_pixmap(data->hWMIconMask);
- destroy_icon_window( display, data );
- hints->flags = (hints->flags & ~IconWindowHint) | IconPixmapHint | IconMaskHint;
-
bits = get_bitmap_argb( hDC, ii.hbmColor, ii.hbmMask, &size );
if (GetIconInfo( icon_small, &ii ))
{
wine_tsx11_unlock();
HeapFree( GetProcessHeap(), 0, bits );
+ hbmOrig = SelectObject(hDC, ii.hbmMask);
+ InvertRect(hDC, &rcMask);
+ SelectObject(hDC, ii.hbmColor); /* force the color bitmap to x11drv mode too */
+ SelectObject(hDC, hbmOrig);
+
+ data->hWMIconBitmap = ii.hbmColor;
+ data->hWMIconMask = ii.hbmMask;
+
+ hints->icon_pixmap = X11DRV_get_pixmap(data->hWMIconBitmap);
+ hints->icon_mask = X11DRV_get_pixmap(data->hWMIconMask);
+ destroy_icon_window( display, data );
+ hints->flags = (hints->flags & ~IconWindowHint) | IconPixmapHint | IconMaskHint;
+
DeleteDC(hDC);
}
}