• Pekka Paalanen's avatar
    xwm: fix intermittent half-drawn decorations problem · db7b9f34
    Pekka Paalanen authored
    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's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
    Tested-by: 's avatarEmmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
    Reviewed-by: 's avatarEmmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
    db7b9f34
Name
Last commit
Last update
..
dnd.c Loading commit data...
hash.c Loading commit data...
hash.h Loading commit data...
launcher.c Loading commit data...
selection.c Loading commit data...
window-manager.c Loading commit data...
xwayland-api.h Loading commit data...
xwayland-internal-interface.h Loading commit data...
xwayland.h Loading commit data...