Xi: remove the GetExtensionVersion hack.
Squashing data into a request that's defined to be padding is probably not the best idea. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
		
							parent
							
								
									73e1055b12
								
							
						
					
					
						commit
						7fbe1b7d63
					
				
							
								
								
									
										16
									
								
								Xi/getvers.c
								
								
								
								
							
							
						
						
									
										16
									
								
								Xi/getvers.c
								
								
								
								
							|  | @ -92,7 +92,6 @@ int | |||
| ProcXGetExtensionVersion(ClientPtr client) | ||||
| { | ||||
|     xGetExtensionVersionReply rep; | ||||
|     XIClientPtr pXIClient; | ||||
| 
 | ||||
|     REQUEST(xGetExtensionVersionReq); | ||||
|     REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq); | ||||
|  | @ -101,21 +100,6 @@ ProcXGetExtensionVersion(ClientPtr client) | |||
| 			  stuff->nbytes + 3) >> 2) | ||||
| 	return BadLength; | ||||
| 
 | ||||
|     pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); | ||||
| 
 | ||||
|     /* GetExtensionVersionReq before XI 2 didn't supply the client's
 | ||||
|      * major/minor. So we don't actually have a clue what they support. | ||||
|      * {major|minor}Version was added as part of XI, so if they are set, we | ||||
|      * know we can trust it. In this case the client must set nbytes to 0 | ||||
|      * though, otherwise we have to assume that the version are padding | ||||
|      * garbage. | ||||
|      */ | ||||
|     if (!stuff->nbytes) /* Client using XQueryInputVersion(). */ | ||||
|     { | ||||
|         pXIClient->major_version = stuff->majorVersion; | ||||
|         pXIClient->minor_version = stuff->minorVersion; | ||||
|     } /* else version unknown, leave it at 0.0 */ | ||||
| 
 | ||||
|     memset(&rep, 0, sizeof(xGetExtensionVersionReply)); | ||||
|     rep.repType = X_Reply; | ||||
|     rep.RepType = X_GetExtensionVersion; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue