[PATCH libXi] _XIPassiveGrabDevice needs to set time value
Peter Hutterer
peter.hutterer at who-t.net
Tue Feb 6 09:21:15 UTC 2018
On Thu, Feb 01, 2018 at 01:59:56AM -0600, Jeff Smith wrote:
> 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 at gmail.com>
oops, sorry about that. turns out the server doesn't do anything with the
data either, though the field gets swapped for endianess. Something to keep
the room warm, I guess.
applied and pushed, thanks
remote: I: patch #201885 updated using rev 60ef7bab67aca3dd7c83e8726feb3c46869a74c2.
remote: I: 1 patch(es) updated to state Accepted.
To git+ssh://git.freedesktop.org/git/xorg/lib/libXi
a1c6392..60ef7ba master -> master
Cheers,
Peter
> ---
> src/XIPassiveGrab.c | 14 ++++++++------
> 1 file 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);
> }
>
>
> --
> 2.14.3
>
More information about the xorg-devel
mailing list