diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-02-26 16:33:24 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-03 14:42:36 +1000 |
commit | c56b75732f4506bae234a5cda474c837bb274d6b (patch) | |
tree | 699a0ab81723447fd9ea9fdef8f66fd99dc02811 | |
parent | 5ead375009f53c9a4634dc8f1939463ac8ef510a (diff) |
Back out the XQueryInputVersion hack, restore previous state.
XI2 should use a separate request to query the version rather than piggy-back
on an existing badly defined request.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | include/X11/extensions/XInput.h | 9 | ||||
-rw-r--r-- | src/XExtInt.c | 5 | ||||
-rw-r--r-- | src/XGetVers.c | 32 | ||||
-rw-r--r-- | src/XIint.h | 2 |
4 files changed, 7 insertions, 41 deletions
diff --git a/include/X11/extensions/XInput.h b/include/X11/extensions/XInput.h index e544117..8c00122 100644 --- a/include/X11/extensions/XInput.h +++ b/include/X11/extensions/XInput.h @@ -1184,18 +1184,11 @@ extern void XFreeDeviceState( XDeviceState* /* list */ ); -/* Replaced by XQueryInputVersion */ -extern _X_DEPRECATED XExtensionVersion *XGetExtensionVersion( +extern XExtensionVersion *XGetExtensionVersion( Display* /* display */, _Xconst char* /* name */ ); -extern XExtensionVersion *XQueryInputVersion( - Display* /* display */, - int /* major */, - int /* minor */ -); - extern XDeviceInfo *XListInputDevices( Display* /* display */, int* /* ndevices */ diff --git a/src/XExtInt.c b/src/XExtInt.c index 6014657..94df1de 100644 --- a/src/XExtInt.c +++ b/src/XExtInt.c @@ -262,10 +262,7 @@ _XiCheckExtInit( return (-1); } ((XInputData *) info->data)->vers = - _XiGetExtensionVersion(dpy, "XInputExtension", - versions[version_index].major_version, - versions[version_index].minor_version, - info); + _XiGetExtensionVersion(dpy, "XInputExtension", info); } if (versions[version_index].major_version > Dont_Check) { diff --git a/src/XGetVers.c b/src/XGetVers.c index ff3ec3c..3b500ae 100644 --- a/src/XGetVers.c +++ b/src/XGetVers.c @@ -57,36 +57,14 @@ SOFTWARE. #include <X11/extensions/extutil.h> #include "XIint.h" -/* DEPRECATED - * - * Pre-MPX versions will use this call. Major/minor is undefined in the - * request. - */ -_X_DEPRECATED XExtensionVersion * -XGetExtensionVersion(register Display * dpy, _Xconst char *name) -{ - XExtensionVersion *ext; - XExtDisplayInfo *info = XInput_find_display(dpy); - - LockDisplay(dpy); - ext = _XiGetExtensionVersion(dpy, name, 0, 0, info); - if (ext != (XExtensionVersion *) NoSuchExtension) { - UnlockDisplay(dpy); - SyncHandle(); - } - return (ext); -} - -/* Query X Input extension version. To be used post-MPX. - */ XExtensionVersion * -XQueryInputVersion(Display *dpy, int major, int minor) +XGetExtensionVersion(register Display * dpy, _Xconst char *name) { XExtensionVersion *ext; XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - ext = _XiGetExtensionVersion(dpy, NULL, major, minor, info); + ext = _XiGetExtensionVersion(dpy, name, info); if (ext != (XExtensionVersion *) NoSuchExtension) { UnlockDisplay(dpy); SyncHandle(); @@ -96,7 +74,7 @@ XQueryInputVersion(Display *dpy, int major, int minor) _X_HIDDEN XExtensionVersion * _XiGetExtensionVersion(register Display * dpy, _Xconst char *name, - int major, int minor, XExtDisplayInfo *info) + XExtDisplayInfo *info) { xGetExtensionVersionReq *req; xGetExtensionVersionReply rep; @@ -108,10 +86,8 @@ _XiGetExtensionVersion(register Display * dpy, _Xconst char *name, GetReq(GetExtensionVersion, req); req->reqType = info->codes->major_opcode; req->ReqType = X_GetExtensionVersion; - req->nbytes = name ? strlen(name) : 0; + req->nbytes = strlen(name); req->length += (unsigned)(req->nbytes + 3) >> 2; - req->majorVersion = major; - req->minorVersion = minor; _XSend(dpy, name, (long)req->nbytes); if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) { diff --git a/src/XIint.h b/src/XIint.h index 57ed95d..97828e4 100644 --- a/src/XIint.h +++ b/src/XIint.h @@ -12,7 +12,7 @@ extern XExtDisplayInfo *XInput_find_display(Display *); extern int _XiCheckExtInit(Display *, int, XExtDisplayInfo *); -extern XExtensionVersion *_XiGetExtensionVersion(Display *, _Xconst char *, int, int, XExtDisplayInfo *); +extern XExtensionVersion *_XiGetExtensionVersion(Display *, _Xconst char *, XExtDisplayInfo *); extern Status _XiEventToWire( register Display * /* dpy */, |