Skip to content
  • Olivier Fourdan's avatar
    xwayland: Do not discard frame callbacks on allow commits · d108c2c8
    Olivier Fourdan authored and Michel Dänzer's avatar Michel Dänzer committed
    
    
    Currently, when a X11 client (usually the X11 window manager from a
    Wayland compositor) changes the value of the X11 property
    `_XWAYLAND_ALLOW_COMMITS` from `false` to `true`, all pending frame
    callbacks on the window are discarded so that the commit occurs
    immediately.
    
    Weston uses that mechanism to prevent the content of the window from
    showing before it's ready when mapping the window initially, but
    discarding the pending frame callbacks has no effect on the initial
    mapping of the X11 window since at that point there cannot be any frame
    callback on a surface which hasn't been committed yet anyway.
    
    However, discarding pending frame callbacks can be problematic if we
    were to use the same `_XWAYLAND_ALLOW_COMMITS` mechanism to prevent
    damages to be posted before the X11 toplevel is updated completely
    (including the window decorations from the X11 window manager).
    
    Remove the portion of code discarding the pending frame callback,
    Xwayland should always wait for a pending frame callback if there's one
    before posting new damages.
    
    Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    Reviewed-by: default avatarMichel Dänzer <mdaenzer@redhat.com>
    xorg/xserver!333
    (cherry picked from commit 66da95a1)
    d108c2c8