summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2016-05-24 18:46:42 +0800
committerPeter Hutterer <peter.hutterer@who-t.net>2016-05-31 08:44:38 +1000
commita779fda224bee0c4d27636503367e55ae93b33c2 (patch)
tree3ea15cc3f58b0599ee97bdea0797e5d3a4d82522 /configure.ac
parent28b2c880a9dbfd91e82397a0f22482d258a8b670 (diff)
xwayland: Use the CLOCK_MONOTONIC clock
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 <jadahl@gmail.com> Acked-by: Daniel Stone <daniels@collabora.com> Tested-by: Olivier Fourdan <ofourdan@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6c96de2c3..0d3ad5a03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2492,6 +2492,10 @@ if test "x$XWAYLAND" = xyes; then
AC_SUBST([XWAYLAND_LIBS])
AC_SUBST([XWAYLAND_SYS_LIBS])
+ if test "x$MONOTONIC_CLOCK" != xyes; then
+ AC_MSG_ERROR([Xwayland requires CLOCK_MONOTONIC support.])
+ fi
+
WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
[${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])