Commit 3a728361 authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Fix exposing partially off-screen windows.

parent 2fb792bd
...@@ -2092,11 +2092,13 @@ HRGN expose_surface( struct window_surface *window_surface, const RECT *rect ) ...@@ -2092,11 +2092,13 @@ HRGN expose_surface( struct window_surface *window_surface, const RECT *rect )
{ {
struct x11drv_window_surface *surface = get_x11_surface( window_surface ); struct x11drv_window_surface *surface = get_x11_surface( window_surface );
HRGN region = 0; HRGN region = 0;
RECT rc = *rect;
if (window_surface->funcs != &x11drv_surface_funcs) return 0; /* we may get the null surface */ if (window_surface->funcs != &x11drv_surface_funcs) return 0; /* we may get the null surface */
window_surface->funcs->lock( window_surface ); window_surface->funcs->lock( window_surface );
add_bounds_rect( &surface->bounds, rect ); OffsetRect( &rc, -window_surface->rect.left, -window_surface->rect.top );
add_bounds_rect( &surface->bounds, &rc );
if (surface->region) if (surface->region)
{ {
region = CreateRectRgnIndirect( rect ); region = CreateRectRgnIndirect( rect );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment