summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-01-26 10:50:28 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-01-26 10:50:28 +1030
commit1b15f1bc3b8b33da3a30b7ee23c728dce9e48929 (patch)
tree280baeb1d41f0d568221b310f25123649f9e623d /src
parentddcc71df2a273a410cb5a933aef5501fa56d84cf (diff)
XiSelectEvent: add additional device parameter.
Diffstat (limited to 'src')
-rw-r--r--src/XiSelEv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/XiSelEv.c b/src/XiSelEv.c
index e94e807..0cd3ca9 100644
--- a/src/XiSelEv.c
+++ b/src/XiSelEv.c
@@ -34,13 +34,14 @@ in this Software without prior written authorization from the author.
#include <X11/Xlibint.h>
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
+#include <X11/extensions/XInput.h>
#include <X11/extensions/extutil.h>
#include <X11/extensions/ge.h>
#include <X11/extensions/geproto.h>
#include "XIint.h"
-int
-XiSelectEvent(Display* dpy, Window win, Mask mask)
+int
+XiSelectEvent(Display* dpy, Window win, XDevice* dev, Mask mask)
{
xXiSelectEventReq* req;
@@ -53,6 +54,10 @@ XiSelectEvent(Display* dpy, Window win, Mask mask)
GetReq(XiSelectEvent, req);
req->reqType = info->codes->major_opcode;
req->ReqType = X_XiSelectEvent;
+ if (dev)
+ req->deviceid = dev->device_id;
+ else
+ req->deviceid = (1 << 7); /* all devices */
req->window = win;
req->mask = mask;