• Jonas Ådahl's avatar
    xwayland: Use the CLOCK_MONOTONIC clock · a779fda2
    Jonas Ådahl authored
    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: Jonas Ådahl's avatarJonas Ådahl <jadahl@gmail.com>
    Acked-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
    Tested-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
    Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
    a779fda2
configure.ac 94.9 KB