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 /src/XGetVers.c | |
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>
Diffstat (limited to 'src/XGetVers.c')
-rw-r--r-- | src/XGetVers.c | 32 |
1 files changed, 4 insertions, 28 deletions
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)) { |