diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-04-01 21:22:49 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-04-01 21:22:49 +0000 |
commit | 8234ad64056e58a79ee3e0f0083f94a54bf51b87 (patch) | |
tree | 64fa2699f389b1c6cd46b6c9a0323bc3983cff11 | |
parent | 73cf4139b3e2f2ee57ae7f508a00e0897a0eb16b (diff) |
Simpler fix for 64 bits architectures, suggested by Peter Hutterer:
Just use Data() to send the xXIEventMask structure on the wire.
-rw-r--r-- | lib/libXi/src/XISelEv.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/libXi/src/XISelEv.c b/lib/libXi/src/XISelEv.c index e10b02dfc..21365e22c 100644 --- a/lib/libXi/src/XISelEv.c +++ b/lib/libXi/src/XISelEv.c @@ -32,7 +32,6 @@ in this Software without prior written authorization from the author. #include <stdint.h> -#include <X11/Xarch.h> #include <X11/Xlibint.h> #include <X11/extensions/XI2proto.h> #include <X11/extensions/XInput2.h> @@ -47,7 +46,6 @@ XISelectEvents(Display* dpy, Window win, XIEventMask* masks, int num_masks) XIEventMask *current; xXISelectEventsReq *req; xXIEventMask mask; - unsigned long long_mask; int i; int len = 0; int r = Success; @@ -85,12 +83,7 @@ XISelectEvents(Display* dpy, Window win, XIEventMask* masks, int num_masks) * and they need to be padded with 0 */ buff = calloc(1, mask.mask_len * 4); memcpy(buff, current->mask, current->mask_len); -#if X_BYTE_ORDER == X_BIG_ENDIAN - long_mask = mask.deviceid << 16 | mask.mask_len; -#else - long_mask = mask.mask_len << 16 | mask.deviceid; -#endif - Data32(dpy, &long_mask, sizeof(xXIEventMask)); + Data(dpy, &mask, sizeof(xXIEventMask)); Data(dpy, buff, mask.mask_len * 4); free(buff); } |