diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-06-01 09:54:03 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-06-02 13:25:44 +1000 |
commit | b1dedc1293a854360d44856cd603d339ce95c777 (patch) | |
tree | 773d4b7e20f72bfe6b6cc504f2a90ffc766fcf14 | |
parent | 4d962ed1841f35aa255bbec89e37f396612cfd96 (diff) |
Use Dont_Check for most XI2 requests.
If a client issues an XI2 request against a non-XI2 server it should
generate a BadRequest error from the server.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/XChDevHier.c | 3 | ||||
-rw-r--r-- | src/XDefDevCur.c | 2 | ||||
-rw-r--r-- | src/XGetCPtr.c | 3 | ||||
-rw-r--r-- | src/XIGrabDevice.c | 2 | ||||
-rw-r--r-- | src/XIProperties.c | 8 | ||||
-rw-r--r-- | src/XISelEv.c | 4 | ||||
-rw-r--r-- | src/XQueryDvPtr.c | 3 | ||||
-rw-r--r-- | src/XSetCPtr.c | 3 | ||||
-rw-r--r-- | src/XWarpDvPtr.c | 3 |
9 files changed, 13 insertions, 18 deletions
diff --git a/src/XChDevHier.c b/src/XChDevHier.c index 30eb615..813f622 100644 --- a/src/XChDevHier.c +++ b/src/XChDevHier.c @@ -31,7 +31,6 @@ in this Software without prior written authorization from The Open Group. */ #include <stdint.h> -#include <X11/extensions/XI.h> #include <X11/extensions/XI2proto.h> #include <X11/Xlibint.h> #include <X11/extensions/XInput2.h> @@ -50,7 +49,7 @@ XIChangeHierarchy(Display* dpy, int dlen = 0, i; LockDisplay(dpy); - if (_XiCheckExtInit(dpy, XInput_2, info) == -1) + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) return (NoSuchExtension); GetReq(XIChangeHierarchy, req); diff --git a/src/XDefDevCur.c b/src/XDefDevCur.c index b8de706..a37544b 100644 --- a/src/XDefDevCur.c +++ b/src/XDefDevCur.c @@ -45,7 +45,7 @@ int XIDefineCursor(Display *dpy, int deviceid, Window w, Cursor cursor) XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) return (NoSuchExtension); GetReq(XIChangeCursor, req); diff --git a/src/XGetCPtr.c b/src/XGetCPtr.c index e6a0050..4517b6a 100644 --- a/src/XGetCPtr.c +++ b/src/XGetCPtr.c @@ -31,7 +31,6 @@ in this Software without prior written authorization from The Open Group. */ #include <stdint.h> -#include <X11/extensions/XI.h> #include <X11/extensions/XI2proto.h> #include <X11/Xlibint.h> #include <X11/extensions/XInput2.h> @@ -46,7 +45,7 @@ XIGetClientPointer(Display* dpy, Window win, int *deviceid) XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) return (NoSuchExtension); GetReq(XIGetClientPointer, req); diff --git a/src/XIGrabDevice.c b/src/XIGrabDevice.c index c466c20..66e359b 100644 --- a/src/XIGrabDevice.c +++ b/src/XIGrabDevice.c @@ -86,7 +86,7 @@ XIUngrabDevice(Display* dpy, int deviceid, Time time) XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) return (NoSuchExtension); GetReq(XIUngrabDevice, req); diff --git a/src/XIProperties.c b/src/XIProperties.c index 26ea574..045cc71 100644 --- a/src/XIProperties.c +++ b/src/XIProperties.c @@ -49,7 +49,7 @@ XIListProperties(Display* dpy, int deviceid, int *num_props_return) LockDisplay(dpy); *num_props_return = 0; - if (_XiCheckExtInit(dpy, XInput_2, info) == -1) + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) goto cleanup; GetReq(XIListProperties, req); @@ -88,7 +88,7 @@ XIDeleteProperty(Display* dpy, int deviceid, Atom property) XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - if (_XiCheckExtInit(dpy, XInput_2, info) == -1) + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) return; GetReq(XIDeleteProperty, req); @@ -111,7 +111,7 @@ XIChangeProperty(Display* dpy, int deviceid, Atom property, Atom type, XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - if (_XiCheckExtInit(dpy, XInput_2, info) == -1) + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) return; GetReq(XIChangeProperty, req); @@ -174,7 +174,7 @@ XIGetProperty(Display* dpy, int deviceid, Atom property, long offset, XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - if (_XiCheckExtInit(dpy, XInput_2, info) == -1) + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) return 1; GetReq(XIGetProperty, req); diff --git a/src/XISelEv.c b/src/XISelEv.c index d76861f..11eb4a2 100644 --- a/src/XISelEv.c +++ b/src/XISelEv.c @@ -52,7 +52,7 @@ XISelectEvents(Display* dpy, Window win, XIEventMask* masks, int num_masks) XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) return (NoSuchExtension); GetReq(XISelectEvents, req); @@ -104,7 +104,7 @@ XIGetSelectedEvents(Display* dpy, Window win, int *num_masks_return) XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - if (_XiCheckExtInit(dpy, XI_2_Major, info) == -1) + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) { *num_masks_return = -1; return NULL; diff --git a/src/XQueryDvPtr.c b/src/XQueryDvPtr.c index e4be23b..b3bfebc 100644 --- a/src/XQueryDvPtr.c +++ b/src/XQueryDvPtr.c @@ -31,7 +31,6 @@ in this Software without prior written authorization from The Open Group. */ #include <stdint.h> -#include <X11/extensions/XI.h> #include <X11/extensions/XI2proto.h> #include <X11/Xlibint.h> #include <X11/extensions/XInput2.h> @@ -60,7 +59,7 @@ XIQueryPointer(Display *dpy, XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) return False; GetReq(XIQueryPointer, req); diff --git a/src/XSetCPtr.c b/src/XSetCPtr.c index 952c0d4..1176c5d 100644 --- a/src/XSetCPtr.c +++ b/src/XSetCPtr.c @@ -34,7 +34,6 @@ in this Software without prior written authorization from The Open Group. */ #include <stdint.h> -#include <X11/extensions/XI.h> #include <X11/extensions/XI2proto.h> #include <X11/Xlibint.h> #include <X11/extensions/XInput2.h> @@ -48,7 +47,7 @@ XISetClientPointer(Display* dpy, Window win, int deviceid) XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) return (NoSuchExtension); GetReq(XISetClientPointer, req); diff --git a/src/XWarpDvPtr.c b/src/XWarpDvPtr.c index c13fc20..60188db 100644 --- a/src/XWarpDvPtr.c +++ b/src/XWarpDvPtr.c @@ -31,7 +31,6 @@ in this Software without prior written authorization from The Open Group. */ #include <stdint.h> -#include <X11/extensions/XI.h> #include <X11/extensions/XI2proto.h> #include <X11/Xlibint.h> #include <X11/extensions/XInput2.h> @@ -55,7 +54,7 @@ XIWarpPointer(Display *dpy, XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) return (NoSuchExtension); GetReq(XIWarpPointer, req); |