winex11: Ignore color key and exposures when using the null surface.

This commit is contained in:
Alexandre Julliard 2013-02-11 11:42:12 +01:00
parent a3b85a5a2e
commit bdfab8cd88
1 changed files with 4 additions and 0 deletions

View File

@ -2059,6 +2059,8 @@ void set_surface_color_key( struct window_surface *window_surface, COLORREF colo
struct x11drv_window_surface *surface = get_x11_surface( window_surface );
COLORREF prev;
if (window_surface->funcs != &x11drv_surface_funcs) return; /* we may get the null surface */
window_surface->funcs->lock( window_surface );
prev = surface->color_key;
set_color_key( surface, color_key );
@ -2074,6 +2076,8 @@ HRGN expose_surface( struct window_surface *window_surface, const RECT *rect )
struct x11drv_window_surface *surface = get_x11_surface( window_surface );
HRGN region = 0;
if (window_surface->funcs != &x11drv_surface_funcs) return 0; /* we may get the null surface */
window_surface->funcs->lock( window_surface );
add_bounds_rect( &surface->bounds, rect );
if (surface->region)