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

Alexandre Julliard julliard at winehq.org
Mon Feb 11 13:06:32 CST 2013


Module: wine
Branch: master
Commit: bdfab8cd88b895612f9eab17a569c18736c9ae34
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bdfab8cd88b895612f9eab17a569c18736c9ae34

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Feb 11 11:42:12 2013 +0100

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

---

 dlls/winex11.drv/bitblt.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c
index e91ca75..e52fbc2 100644
--- a/dlls/winex11.drv/bitblt.c
+++ b/dlls/winex11.drv/bitblt.c
@@ -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)




More information about the wine-cvs mailing list