winex11: Handle Expose events on top-level client windows.

This commit is contained in:
Alexandre Julliard 2013-01-23 19:09:29 +01:00
parent 951415b602
commit 8373f8b6f6
2 changed files with 16 additions and 12 deletions

View File

@ -829,21 +829,24 @@ static void X11DRV_Expose( HWND hwnd, XEvent *xev )
rect.right = event->x + event->width;
rect.bottom = event->y + event->height;
if (data->surface)
if (event->window != data->client_window)
{
surface_region = expose_surface( data->surface, &rect );
if (!surface_region) flags = 0;
if (data->vis.visualid != default_visual.visualid)
data->surface->funcs->flush( data->surface );
if (data->surface)
{
surface_region = expose_surface( data->surface, &rect );
if (!surface_region) flags = 0;
else OffsetRgn( surface_region, data->whole_rect.left - data->client_rect.left,
data->whole_rect.top - data->client_rect.top );
if (data->vis.visualid != default_visual.visualid)
data->surface->funcs->flush( data->surface );
}
OffsetRect( &rect, data->whole_rect.left - data->client_rect.left,
data->whole_rect.top - data->client_rect.top );
}
if (event->window != root_window)
{
OffsetRect( &rect, data->whole_rect.left - data->client_rect.left,
data->whole_rect.top - data->client_rect.top );
if (surface_region) OffsetRgn( surface_region, data->whole_rect.left - data->client_rect.left,
data->whole_rect.top - data->client_rect.top );
if (GetWindowLongW( data->hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL)
mirror_rect( &data->client_rect, &rect );

View File

@ -1383,11 +1383,12 @@ Window create_client_window( struct x11drv_win_data *data, const XVisualInfo *vi
attr.bit_gravity = NorthWestGravity;
attr.win_gravity = NorthWestGravity;
attr.backing_store = NotUseful;
attr.event_mask = ExposureMask;
data->client_window = XCreateWindow( data->display, data->whole_window, x, y, cx, cy,
0, default_visual.depth, InputOutput, visual->visual,
CWBitGravity | CWWinGravity | CWBackingStore | CWColormap,
&attr );
CWBitGravity | CWWinGravity | CWBackingStore |
CWColormap | CWEventMask, &attr );
if (!data->client_window) return 0;
XSaveContext( data->display, data->client_window, winContext, (char *)data->hwnd );