backends/x11: Fix time-comparison bug causing hang
A comparison in translate_device_event() does not account for the fact that X's clock wraps about every 49.7 days. When triggered, this causes an unresponsive GUI. Replace simple less-than comparison with XSERVER_TIME_IS_BEFORE macro, which accounts for the wrapping of X's clock. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/12
This commit is contained in:
parent
206ca43c91
commit
6be56de140
@ -112,7 +112,7 @@ translate_device_event (MetaBackendX11 *x11,
|
|||||||
|
|
||||||
if (!device_event->send_event && device_event->time != CurrentTime)
|
if (!device_event->send_event && device_event->time != CurrentTime)
|
||||||
{
|
{
|
||||||
if (device_event->time < priv->latest_evtime)
|
if (XSERVER_TIME_IS_BEFORE (device_event->time, priv->latest_evtime))
|
||||||
{
|
{
|
||||||
/* Emulated pointer events received after XIRejectTouch is received
|
/* Emulated pointer events received after XIRejectTouch is received
|
||||||
* on a passive touch grab will contain older timestamps, update those
|
* on a passive touch grab will contain older timestamps, update those
|
||||||
|
Loading…
Reference in New Issue
Block a user