winex11: Make sure the cursor bitmaps are owned by x11drv.

This commit is contained in:
Alexandre Julliard 2011-09-14 14:53:59 +02:00
parent 0f9dfb932e
commit dc1056284f
1 changed files with 5 additions and 0 deletions

View File

@ -1081,6 +1081,11 @@ static Cursor create_xlib_cursor( HDC hdc, const ICONINFOEXW *icon, int width, i
if (has_alpha)
{
/* make sure the bitmaps are owned by x11drv */
HBITMAP orig = SelectObject( hdc, icon->hbmMask );
SelectObject( hdc, xor_bitmap );
SelectObject( hdc, orig );
memset( mask_bits, 0, width_bytes * height );
for (y = 0, ptr = color_bits; y < height; y++)
for (x = 0; x < width; x++, ptr++)