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 ) ...@@ -829,21 +829,24 @@ static void X11DRV_Expose( HWND hwnd, XEvent *xev )
rect.right = event->x + event->width; rect.right = event->x + event->width;
rect.bottom = event->y + event->height; rect.bottom = event->y + event->height;
if (event->window != data->client_window)
{
if (data->surface) if (data->surface)
{ {
surface_region = expose_surface( data->surface, &rect ); surface_region = expose_surface( data->surface, &rect );
if (!surface_region) flags = 0; 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) if (data->vis.visualid != default_visual.visualid)
data->surface->funcs->flush( data->surface ); data->surface->funcs->flush( data->surface );
} }
if (event->window != root_window)
{
OffsetRect( &rect, data->whole_rect.left - data->client_rect.left, OffsetRect( &rect, data->whole_rect.left - data->client_rect.left,
data->whole_rect.top - data->client_rect.top ); 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) if (GetWindowLongW( data->hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL)
mirror_rect( &data->client_rect, &rect ); mirror_rect( &data->client_rect, &rect );
......
...@@ -1383,11 +1383,12 @@ Window create_client_window( struct x11drv_win_data *data, const XVisualInfo *vi ...@@ -1383,11 +1383,12 @@ Window create_client_window( struct x11drv_win_data *data, const XVisualInfo *vi
attr.bit_gravity = NorthWestGravity; attr.bit_gravity = NorthWestGravity;
attr.win_gravity = NorthWestGravity; attr.win_gravity = NorthWestGravity;
attr.backing_store = NotUseful; attr.backing_store = NotUseful;
attr.event_mask = ExposureMask;
data->client_window = XCreateWindow( data->display, data->whole_window, x, y, cx, cy, data->client_window = XCreateWindow( data->display, data->whole_window, x, y, cx, cy,
0, default_visual.depth, InputOutput, visual->visual, 0, default_visual.depth, InputOutput, visual->visual,
CWBitGravity | CWWinGravity | CWBackingStore | CWColormap, CWBitGravity | CWWinGravity | CWBackingStore |
&attr ); CWColormap | CWEventMask, &attr );
if (!data->client_window) return 0; if (!data->client_window) return 0;
XSaveContext( data->display, data->client_window, winContext, (char *)data->hwnd ); 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