diff options
author | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
commit | 0f834b91a4768673833ab4917e87d86c237bb1a6 (patch) | |
tree | 363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/Xi/xiqueryversion.c | |
parent | fc72edebf875378459368c5383d9023730cbca54 (diff) | |
download | vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2 vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip |
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/Xi/xiqueryversion.c')
-rw-r--r-- | xorg-server/Xi/xiqueryversion.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/xorg-server/Xi/xiqueryversion.c b/xorg-server/Xi/xiqueryversion.c index a94061432..fc0ca751b 100644 --- a/xorg-server/Xi/xiqueryversion.c +++ b/xorg-server/Xi/xiqueryversion.c @@ -33,7 +33,6 @@ #include <dix-config.h> #endif - #include "inputstr.h" #include <X11/Xmd.h> @@ -45,7 +44,8 @@ #include "xiqueryversion.h" #include "misc.h" -extern XExtensionVersion XIVersion; /* defined in getvers.c */ +extern XExtensionVersion XIVersion; /* defined in getvers.c */ + /** * Return the supported XI version. * @@ -63,21 +63,28 @@ ProcXIQueryVersion(ClientPtr client) REQUEST_SIZE_MATCH(xXIQueryVersionReq); /* This request only exists after XI2 */ - if (stuff->major_version < 2) - { + if (stuff->major_version < 2) { client->errorValue = stuff->major_version; return BadValue; } pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); - if (version_compare(XIVersion.major_version, XIVersion.minor_version, - stuff->major_version, stuff->minor_version) > 0) + if (pXIClient->major_version && + (stuff->major_version != pXIClient->major_version || + stuff->minor_version != pXIClient->minor_version)) { + client->errorValue = stuff->major_version; + return BadValue; + } + + + if (version_compare(XIVersion.major_version, XIVersion.minor_version, + stuff->major_version, stuff->minor_version) > 0) { major = stuff->major_version; minor = stuff->minor_version; - } else - { + } + else { major = XIVersion.major_version; minor = XIVersion.minor_version; } @@ -112,11 +119,11 @@ SProcXIQueryVersion(ClientPtr client) } void -SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply *rep) +SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->major_version); swaps(&rep->minor_version); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, (char *) rep); } |