mirror of
https://github.com/brl/mutter.git
synced 2025-02-04 15:44:10 +00:00
backends/x11: Improve grab-device clock updates
meta_backend_x11_grab_device is performing X server clock comparison using the MAX macro, which comes down to a simple greater-than. Use XSERVER_TIME_IS_BEFORE, which is a better macro for X server clock comparisons, as it accounts for 32-bit wrap-around. https://gitlab.gnome.org/GNOME/mutter/merge_requests/174 (cherry picked from commit 1bfa20929b36d06cc23667d1122175149615b56d)
This commit is contained in:
parent
1276cc97d1
commit
a41ae88c09
@ -547,8 +547,9 @@ meta_backend_x11_grab_device (MetaBackend *backend,
|
|||||||
XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
|
XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (timestamp != CurrentTime)
|
if (timestamp != CurrentTime &&
|
||||||
timestamp = MAX (timestamp, priv->latest_evtime);
|
XSERVER_TIME_IS_BEFORE (timestamp, priv->latest_evtime))
|
||||||
|
timestamp = priv->latest_evtime;
|
||||||
|
|
||||||
XISetMask (mask.mask, XI_ButtonPress);
|
XISetMask (mask.mask, XI_ButtonPress);
|
||||||
XISetMask (mask.mask, XI_ButtonRelease);
|
XISetMask (mask.mask, XI_ButtonRelease);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user