summaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-01-16 17:01:11 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-01-18 13:13:57 +0200
commitdb7b9f3438522aa01fb37bf12275e697f22bf6f6 (patch)
tree0fcc772fd970161f9a666c581a5c508592a5f4b8 /xwayland
parent6d3887baec12c3a2b833301907546fba8c1fb26d (diff)
xwm: fix intermittent half-drawn decorations problem
To reproduce the problem: - start weston (x11 backend worked, glamor in Xwayland makes no difference) - start xterm - very very slowly move the pointer in the xterm decorations onto or away from a button - the moment the decorations are updated, they will appear incomplete, e.g. completely without buttons and title text - if you cause just one more pointer motion event, the decorations will update to completely drawn appearance Another way to reproduce the problem is to have an xterm and change its window title. This is easy if you use a shell prompt that updates the terminal window title. When the title updates, decorations will be half-drawn until something happens in XWM. The fix: flush. Apparently the drawing commands did not get flushed to the X server until any other X11 action pushed them through. xcb_flush() is the real fix here. cairo_surface_flush() is added just for good measure, because documentation indicates it would be better used, however it was not strictly necessary to fix the problem in my experiments. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com> Tested-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> Reviewed-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/window-manager.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 1dd8083f..832f824a 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -1148,6 +1148,8 @@ weston_wm_window_draw_decoration(void *data)
}
cairo_destroy(cr);
+ cairo_surface_flush(window->cairo_surface);
+ xcb_flush(window->wm->conn);
if (window->surface) {
pixman_region32_fini(&window->surface->pending.opaque);