forked from Mirrors/wine-wine
winex11: Hold a reference to the surface in UpdateLayeredWindow.
parent
e41a482890
commit
2500e21a90
|
@ -2386,11 +2386,15 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
|
||||||
}
|
}
|
||||||
else set_surface_color_key( surface, color_key );
|
else set_surface_color_key( surface, color_key );
|
||||||
|
|
||||||
|
if (surface) window_surface_add_ref( surface );
|
||||||
release_win_data( data );
|
release_win_data( data );
|
||||||
|
|
||||||
if (!surface) return FALSE;
|
if (!surface) return FALSE;
|
||||||
if (!info->hdcSrc) return TRUE;
|
if (!info->hdcSrc)
|
||||||
if (info->prcDirty && !IntersectRect( &rect, &rect, info->prcDirty )) return TRUE;
|
{
|
||||||
|
window_surface_release( surface );
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
dst_bits = surface->funcs->get_info( surface, bmi );
|
dst_bits = surface->funcs->get_info( surface, bmi );
|
||||||
|
|
||||||
|
@ -2403,6 +2407,7 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
|
||||||
|
|
||||||
if (info->prcDirty)
|
if (info->prcDirty)
|
||||||
{
|
{
|
||||||
|
IntersectRect( &rect, &rect, info->prcDirty );
|
||||||
memcpy( src_bits, dst_bits, bmi->bmiHeader.biSizeImage );
|
memcpy( src_bits, dst_bits, bmi->bmiHeader.biSizeImage );
|
||||||
PatBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS );
|
PatBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS );
|
||||||
}
|
}
|
||||||
|
@ -2422,6 +2427,7 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
|
||||||
surface->funcs->flush( surface );
|
surface->funcs->flush( surface );
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
window_surface_release( surface );
|
||||||
if (hdc) DeleteDC( hdc );
|
if (hdc) DeleteDC( hdc );
|
||||||
if (dib) DeleteObject( dib );
|
if (dib) DeleteObject( dib );
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue