diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2020-01-04 17:56:27 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2020-01-04 17:56:27 +0000 |
commit | 4002ec1461f03ce091011924a43249e2ade6034a (patch) | |
tree | f6c4c9f336e6402e5af09588d664d8a94aea1040 /lib/libXi/src | |
parent | 1128148d76d7952d7aacfa2b083f5b5a96b4b4d5 (diff) |
Update to libXi 1.7.10. Tested by krw@ and naddy@
Diffstat (limited to 'lib/libXi/src')
-rw-r--r-- | lib/libXi/src/XExtInt.c | 14 | ||||
-rw-r--r-- | lib/libXi/src/XIPassiveGrab.c | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/lib/libXi/src/XExtInt.c b/lib/libXi/src/XExtInt.c index a35fcc630..d3798761e 100644 --- a/lib/libXi/src/XExtInt.c +++ b/lib/libXi/src/XExtInt.c @@ -1616,6 +1616,8 @@ size_classes(xXIAnyInfo* from, int nclasses) return len; } +#define FP3232_TO_DOUBLE(x) ((double) (x).integral + (double) (x).frac / (1ULL << 32)) + /* Copy classes from any into to->classes and return the number of bytes * copied. Memory layout of to->classes is * [clsptr][clsptr][clsptr][classinfo][classinfo]... @@ -1724,10 +1726,9 @@ copy_classes(XIDeviceInfo* to, xXIAnyInfo* from, int *nclasses) cls_lib->number = cls_wire->number; cls_lib->label = cls_wire->label; cls_lib->resolution = cls_wire->resolution; - cls_lib->min = cls_wire->min.integral; - cls_lib->max = cls_wire->max.integral; - cls_lib->value = cls_wire->value.integral; - /* FIXME: fractional parts */ + cls_lib->min = FP3232_TO_DOUBLE(cls_wire->min); + cls_lib->max = FP3232_TO_DOUBLE(cls_wire->max); + cls_lib->value = FP3232_TO_DOUBLE(cls_wire->value); cls_lib->mode = cls_wire->mode; to->classes[cls_idx++] = any_lib; @@ -1748,8 +1749,7 @@ copy_classes(XIDeviceInfo* to, xXIAnyInfo* from, int *nclasses) cls_lib->number = cls_wire->number; cls_lib->scroll_type= cls_wire->scroll_type; cls_lib->flags = cls_wire->flags; - cls_lib->increment = cls_wire->increment.integral; - cls_lib->increment += (unsigned int)cls_wire->increment.frac/(double)(1ULL << 32); + cls_lib->increment = FP3232_TO_DOUBLE(cls_wire->increment); to->classes[cls_idx++] = any_lib; } @@ -2000,8 +2000,6 @@ wireToTouchOwnershipEvent(xXITouchOwnershipEvent *in, return 1; } -#define FP3232_TO_DOUBLE(x) ((double) (x).integral + (x).frac / (1ULL << 32)) - static int wireToBarrierEvent(xXIBarrierEvent *in, XGenericEventCookie *cookie) { diff --git a/lib/libXi/src/XIPassiveGrab.c b/lib/libXi/src/XIPassiveGrab.c index c74351685..32b0ab30a 100644 --- a/lib/libXi/src/XIPassiveGrab.c +++ b/lib/libXi/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); } |