summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-13 15:37:32 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-13 15:39:17 +1000
commit94bfb0cc3ebbefe548b440f8c5e14154c3a76440 (patch)
tree9511cd4af715650791e6e65ab8806231561125fd
parente600e6cf47abd61bd3554967c4fdb0f78cc68f41 (diff)
Cater for new event-specific raw event types.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--configure.ac2
-rw-r--r--include/X11/extensions/XInput2.h3
-rw-r--r--src/XExtInt.c13
3 files changed, 12 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index e811e94..15f2a17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@ AC_PROG_SED
XORG_CWARNFLAGS
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XI, [xproto >= 7.0.13] [x11 >= 1.2.99.1] [xextproto >= 7.0.3] [xext >= 1.0.99.1] [inputproto >= 1.9.99.13])
+PKG_CHECK_MODULES(XI, [xproto >= 7.0.13] [x11 >= 1.2.99.1] [xextproto >= 7.0.3] [xext >= 1.0.99.1] [inputproto >= 1.9.99.14])
XI_CFLAGS="$CWARNFLAGS $XI_CFLAGS"
AC_SUBST(XI_CFLAGS)
AC_SUBST(XI_LIBS)
diff --git a/include/X11/extensions/XInput2.h b/include/X11/extensions/XInput2.h
index 72405f1..c6bfca0 100644
--- a/include/X11/extensions/XInput2.h
+++ b/include/X11/extensions/XInput2.h
@@ -238,12 +238,11 @@ typedef struct {
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
int extension; /* XI extension offset */
- int evtype; /* XI_RawEvent */
+ int evtype; /* XI_RawKeyPress, XI_RawKeyRelease, etc. */
Time time;
int deviceid;
int sourceid;
int detail;
- int eventtype;
XIValuatorState valuators;
double *raw_values;
} XIRawEvent;
diff --git a/src/XExtInt.c b/src/XExtInt.c
index 87bbaf4..9eec866 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -893,7 +893,11 @@ XInputWireToCookie(
}
return ENQUEUE_EVENT;
- case XI_RawEvent:
+ case XI_RawKeyPress:
+ case XI_RawKeyRelease:
+ case XI_RawButtonPress:
+ case XI_RawButtonRelease:
+ case XI_RawMotion:
*cookie = *(XGenericEventCookie*)save;
if (!wireToRawEvent((xXIRawEvent*)event, cookie))
{
@@ -1252,7 +1256,11 @@ XInputCopyCookie(Display *dpy, XGenericEventCookie *in, XGenericEventCookie *out
case XI_PropertyEvent:
ret = copyPropertyEvent(in, out);
break;
- case XI_RawEvent:
+ case XI_RawKeyPress:
+ case XI_RawKeyRelease:
+ case XI_RawButtonPress:
+ case XI_RawButtonRelease:
+ case XI_RawMotion:
ret = copyRawEvent(in, out);
break;
default:
@@ -1552,7 +1560,6 @@ wireToRawEvent(xXIRawEvent *in, XGenericEventCookie *cookie)
out->time = in->time;
out->detail = in->detail;
out->deviceid = in->deviceid;
- out->eventtype = in->eventtype;
out->valuators.mask_len = in->valuators_len * 4;
out->valuators.mask = next_block(&ptr, out->valuators.mask_len);