Alexandre Julliard : winex11: Make sure to flush painting operations before moving a window.

Alexandre Julliard julliard at winehq.org
Fri Apr 11 06:27:09 CDT 2008


Module: wine
Branch: master
Commit: 70ef99e5e115078d7d3ece8b04aabb94f701e167
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=70ef99e5e115078d7d3ece8b04aabb94f701e167

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Apr 10 14:47:19 2008 +0200

winex11: Make sure to flush painting operations before moving a window.

---

 dlls/winex11.drv/window.c |    9 +--------
 dlls/winex11.drv/winpos.c |    9 ++++++++-
 2 files changed, 9 insertions(+), 9 deletions(-)

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 @@ static void sync_gl_drawable(Display *display, struct x11drv_win_data *data)
     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 @@ void X11DRV_sync_client_position( Display *display, struct x11drv_win_data *data
     }
 
     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 @@ static void map_window( Display *display, struct x11drv_win_data *data, DWORD ne
         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 @@ void X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, UINT swp_flags,
             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 @@ void X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, UINT swp_flags,
             update_net_wm_states( display, data );
         }
     }
+
+    wine_tsx11_lock();
+    XFlush( display );  /* make sure changes are done before we start painting again */
+    wine_tsx11_unlock();
 }
 
 




More information about the wine-cvs mailing list