diff options
author | Jeff Smith <whydoubt@gmail.com> | 2018-02-01 01:59:56 -0600 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2018-02-06 19:19:44 +1000 |
commit | 60ef7bab67aca3dd7c83e8726feb3c46869a74c2 (patch) | |
tree | 29eaf2cd7ab3b57816888f7c5011e634928e26e1 | |
parent | a1c639255b7a9270fea52de3f186eb2fca9de01a (diff) |
_XIPassiveGrabDevice needs to set time value
When setting up a XIPassiveGrabDevice request, the time field is not
being set, leading to improper data being passed 'over the wire'.
Accept a time value into _XIPassiveGrabDevice and use it to set the time
field in the request. Since the the functions calling
_XIPassiveGrabDevice are part of the API, and they do not accept time
values, they can just pass CurrentTime.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/XIPassiveGrab.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/XIPassiveGrab.c b/src/XIPassiveGrab.c index c743516..32b0ab3 100644 --- a/src/XIPassiveGrab.c +++ b/src/XIPassiveGrab.c @@ -38,7 +38,8 @@ _XIPassiveGrabDevice(Display* dpy, int deviceid, int grabtype, int detail, Window grab_window, Cursor cursor, int grab_mode, int paired_device_mode, Bool owner_events, XIEventMask *mask, - int num_modifiers, XIGrabModifiers *modifiers_inout) + int num_modifiers, XIGrabModifiers *modifiers_inout, + Time time) { xXIPassiveGrabDeviceReq *req; xXIPassiveGrabDeviceReply reply; @@ -74,6 +75,7 @@ _XIPassiveGrabDevice(Display* dpy, int deviceid, int grabtype, int detail, req->num_modifiers = num_modifiers; req->mask_len = (mask->mask_len + 3)/4; req->grab_type = grabtype; + req->time = time; len = req->mask_len + num_modifiers; SetReqLen(req, len, len); @@ -118,7 +120,7 @@ XIGrabButton(Display* dpy, int deviceid, int button, return _XIPassiveGrabDevice(dpy, deviceid, XIGrabtypeButton, button, grab_window, cursor, grab_mode, paired_device_mode, owner_events, mask, - num_modifiers, modifiers_inout); + num_modifiers, modifiers_inout, CurrentTime); } int @@ -130,7 +132,7 @@ XIGrabKeycode(Display* dpy, int deviceid, int keycode, return _XIPassiveGrabDevice(dpy, deviceid, XIGrabtypeKeycode, keycode, grab_window, None, grab_mode, paired_device_mode, owner_events, mask, num_modifiers, - modifiers_inout); + modifiers_inout, CurrentTime); } int @@ -142,7 +144,7 @@ XIGrabEnter(Display *dpy, int deviceid, Window grab_window, Cursor cursor, return _XIPassiveGrabDevice(dpy, deviceid, XIGrabtypeEnter, 0, grab_window, cursor, grab_mode, paired_device_mode, owner_events, mask, num_modifiers, - modifiers_inout); + modifiers_inout, CurrentTime); } int @@ -153,7 +155,7 @@ XIGrabFocusIn(Display *dpy, int deviceid, Window grab_window, int grab_mode, return _XIPassiveGrabDevice(dpy, deviceid, XIGrabtypeFocusIn, 0, grab_window, None, grab_mode, paired_device_mode, owner_events, mask, num_modifiers, - modifiers_inout); + modifiers_inout, CurrentTime); } int @@ -172,7 +174,7 @@ XIGrabTouchBegin(Display *dpy, int deviceid, Window grab_window, return _XIPassiveGrabDevice(dpy, deviceid, XIGrabtypeTouchBegin, 0, grab_window, None, XIGrabModeTouch, GrabModeAsync, owner_events, mask, - num_modifiers, modifiers_inout); + num_modifiers, modifiers_inout, CurrentTime); } |