winex11: Make sure to flush painting operations before moving a window.
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index cc4ff7d..ac70c85 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c
@@ -549,6 +549,7 @@ data->pixmap = pix; data->gl_drawable = glxp; + XFlush( display ); wine_tsx11_unlock(); SetPropA(data->hwnd, gl_drawable_prop, (HANDLE)data->gl_drawable); @@ -1020,14 +1021,6 @@ } if (data->gl_drawable && (mask & (CWWidth|CWHeight))) sync_gl_drawable( display, data ); - - /* make sure the changes get to the server before we start painting */ - if (data->client_window || data->gl_drawable) - { - wine_tsx11_lock(); - XFlush(display); - wine_tsx11_unlock(); - } }
diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index 2ae0aba..81fb93d 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c
@@ -235,7 +235,6 @@ X11DRV_sync_window_style( display, data ); wine_tsx11_lock(); XMapWindow( display, data->whole_window ); - XFlush( display ); wine_tsx11_unlock(); } else set_xembed_flags( display, data, XEMBED_MAPPED ); @@ -471,6 +470,10 @@ move_window_bits( data, &valid_rects[1], &valid_rects[0], &old_client_rect ); } + wine_tsx11_lock(); + XFlush( gdi_display ); /* make sure painting is done before we move the window */ + wine_tsx11_unlock(); + X11DRV_sync_client_position( display, data, swp_flags, &old_client_rect, &old_whole_rect ); if (!data->whole_window) return; @@ -519,6 +522,10 @@ update_net_wm_states( display, data ); } } + + wine_tsx11_lock(); + XFlush( display ); /* make sure changes are done before we start painting again */ + wine_tsx11_unlock(); }