(!1893) dix: write out X_GetInputFocus reply directly
No need for using a complex callback machinery, if we just move the little pieces of byte-swapping directly into the request handler. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									21cb2ca5f5
								
							
						
					
					
						commit
						d52652d5f9
					
				|  | @ -4972,7 +4972,6 @@ int | |||
| ProcGetInputFocus(ClientPtr client) | ||||
| { | ||||
|     DeviceIntPtr kbd = PickKeyboard(client); | ||||
|     xGetInputFocusReply rep; | ||||
|     FocusClassPtr focus = kbd->focus; | ||||
|     int rc; | ||||
| 
 | ||||
|  | @ -4983,7 +4982,7 @@ ProcGetInputFocus(ClientPtr client) | |||
|     if (rc != Success) | ||||
|         return rc; | ||||
| 
 | ||||
|     rep = (xGetInputFocusReply) { | ||||
|     xGetInputFocusReply rep = { | ||||
|         .type = X_Reply, | ||||
|         .length = 0, | ||||
|         .sequenceNumber = client->sequence, | ||||
|  | @ -4997,7 +4996,11 @@ ProcGetInputFocus(ClientPtr client) | |||
|     else | ||||
|         rep.focus = focus->win->drawable.id; | ||||
| 
 | ||||
|     WriteReplyToClient(client, sizeof(xGetInputFocusReply), &rep); | ||||
|     if (client->swapped) { | ||||
|         swaps(&rep.sequenceNumber); | ||||
|         swapl(&rep.focus); | ||||
|     } | ||||
|     WriteToClient(client, sizeof(rep), &rep); | ||||
|     return Success; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -239,14 +239,6 @@ SwapTimeCoordWrite(ClientPtr pClient, int size, xTimecoord * pRep) | |||
| 
 | ||||
| } | ||||
| 
 | ||||
| void _X_COLD | ||||
| SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply * pRep) | ||||
| { | ||||
|     swaps(&pRep->sequenceNumber); | ||||
|     swapl(&pRep->focus); | ||||
|     WriteToClient(pClient, size, pRep); | ||||
| } | ||||
| 
 | ||||
| static void _X_COLD | ||||
| SwapCharInfo(xCharInfo * pInfo) | ||||
| { | ||||
|  |  | |||
|  | @ -758,7 +758,7 @@ ReplySwapPtr ReplySwapVector[256] = { | |||
|     ReplyNotSwappd,                             /* 40 */ | ||||
|     ReplyNotSwappd, | ||||
|     ReplyNotSwappd, | ||||
|     (ReplySwapPtr) SGetInputFocusReply, | ||||
|     ReplyNotSwappd, | ||||
|     ReplyNotSwappd, | ||||
|     ReplyNotSwappd,                             /* 45 */ | ||||
|     ReplyNotSwappd, | ||||
|  |  | |||
|  | @ -60,10 +60,6 @@ extern void SwapTimeCoordWrite(ClientPtr /* pClient */ , | |||
|                                int /* size */ , | ||||
|                                xTimecoord * /* pRep */ ); | ||||
| 
 | ||||
| extern void SGetInputFocusReply(ClientPtr /* pClient */ , | ||||
|                                 int /* size */ , | ||||
|                                 xGetInputFocusReply * /* pRep */ ); | ||||
| 
 | ||||
| extern void SListExtensionsReply(ClientPtr /* pClient */ , | ||||
|                                  int /* size */ , | ||||
|                                  xListExtensionsReply * /* pRep */ ); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue