Blame SOURCES/0001-backends-x11-Fix-time-comparison-bug-causing-hang.patch

ded3ae
From 05bf09ea4aa5a7dc22869075ea2096c4a293d70d Mon Sep 17 00:00:00 2001
ded3ae
From: Jeff Smith <whydoubt@gmail.com>
ded3ae
Date: Wed, 31 Jan 2018 23:27:19 -0600
ded3ae
Subject: [PATCH] backends/x11: Fix time-comparison bug causing hang
ded3ae
ded3ae
A comparison in translate_device_event() does not account for the fact
ded3ae
that X's clock wraps about every 49.7 days.  When triggered, this causes
ded3ae
an unresponsive GUI.
ded3ae
ded3ae
Replace simple less-than comparison with XSERVER_TIME_IS_BEFORE macro,
ded3ae
which accounts for the wrapping of X's clock.
ded3ae
ded3ae
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/12
ded3ae
---
ded3ae
 src/backends/x11/meta-backend-x11.c | 2 +-
ded3ae
 1 file changed, 1 insertion(+), 1 deletion(-)
ded3ae
ded3ae
diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c
ded3ae
index 233532435..f447f785f 100644
ded3ae
--- a/src/backends/x11/meta-backend-x11.c
ded3ae
+++ b/src/backends/x11/meta-backend-x11.c
ded3ae
@@ -112,7 +112,7 @@ translate_device_event (MetaBackendX11 *x11,
ded3ae
 
ded3ae
   if (!device_event->send_event && device_event->time != CurrentTime)
ded3ae
     {
ded3ae
-      if (device_event->time < priv->latest_evtime)
ded3ae
+      if (XSERVER_TIME_IS_BEFORE (device_event->time, priv->latest_evtime))
ded3ae
         {
ded3ae
           /* Emulated pointer events received after XIRejectTouch is received
ded3ae
            * on a passive touch grab will contain older timestamps, update those
ded3ae
-- 
ded3ae
2.17.1
ded3ae