winex11.drv: Make sure that default clipping region exists before calling ExcludeUpdateRgn().

This commit is contained in:
Dmitry Timoshkov 2011-01-31 19:30:43 +08:00 committed by Alexandre Julliard
parent bc13c7eb90
commit 38167e71d1
1 changed files with 5 additions and 1 deletions

View File

@ -1605,7 +1605,7 @@ static void move_window_bits( struct x11drv_win_data *data, const RECT *old_rect
RECT dst_rect = *new_rect;
HDC hdc_src, hdc_dst;
INT code;
HRGN rgn = 0;
HRGN rgn;
HWND parent = 0;
if (!data->whole_window)
@ -1624,6 +1624,9 @@ static void move_window_bits( struct x11drv_win_data *data, const RECT *old_rect
hdc_src = hdc_dst = GetDCEx( data->hwnd, 0, DCX_CACHE );
}
rgn = CreateRectRgnIndirect( &dst_rect );
SelectClipRgn( hdc_dst, rgn );
DeleteObject( rgn );
ExcludeUpdateRgn( hdc_dst, data->hwnd );
code = X11DRV_START_EXPOSURES;
@ -1636,6 +1639,7 @@ static void move_window_bits( struct x11drv_win_data *data, const RECT *old_rect
dst_rect.right - dst_rect.left, dst_rect.bottom - dst_rect.top,
hdc_src, src_rect.left, src_rect.top, SRCCOPY );
rgn = 0;
code = X11DRV_END_EXPOSURES;
ExtEscape( hdc_dst, X11DRV_ESCAPE, sizeof(code), (LPSTR)&code, sizeof(rgn), (LPSTR)&rgn );