Commit 8373f8b6 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 951415b6
......@@ -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 (event->window != root_window)
{
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 (surface_region) OffsetRgn( surface_region, data->whole_rect.left - data->client_rect.left,
data->whole_rect.top - data->client_rect.top );
}
if (event->window != root_window)
{
if (GetWindowLongW( data->hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL)
mirror_rect( &data->client_rect, &rect );
......
......@@ -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 );
......
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