Skip to content
  • Jonas Ådahl's avatar
    xwayland: Use the CLOCK_MONOTONIC clock · a779fda2
    Jonas Ådahl authored and Peter Hutterer's avatar Peter Hutterer committed
    
    
    By default the X server will try CLOCK_MONOTONIC_COARSE before
    CLOCK_MONOTONIC, while A Wayland compositor may only support getting
    their timestamps from the CLOCK_MONOTONIC clock. This causes various
    issues since it may happen that a timestamp from CLOCK_MONOTONIC
    retrieved before a sending an X request will still be "later" than the
    timestamp the X server than gets after receiving the request, due to the
    fact that CLOCK_MONOTONIC_COARSE has a lower resolution.
    
    To avoid these issues, make Xwayland always use CLOCK_MONOTONIC, so
    that it becomes possible for Wayland compositor only supporting
    CLOCK_MONOTONIC and X server to use the same clock.
    
    Signed-off-by: default avatarJonas Ådahl <jadahl@gmail.com>
    Acked-by: default avatarDaniel Stone <daniels@collabora.com>
    Tested-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    a779fda2