From 171e929a08098b6c844887adc43879c7579dc15f Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sun, 10 Jun 2012 13:21:33 +0000 Subject: Update to xserver 1.12.2. tested by naddy@, krw@, mpi@. --- xserver/Xi/xisetdevfocus.c | 51 +++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 28 deletions(-) (limited to 'xserver/Xi/xisetdevfocus.c') diff --git a/xserver/Xi/xisetdevfocus.c b/xserver/Xi/xisetdevfocus.c index 059424e41..b52c9cc99 100644 --- a/xserver/Xi/xisetdevfocus.c +++ b/xserver/Xi/xisetdevfocus.c @@ -32,24 +32,22 @@ #include #endif -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ #include #include -#include "exglobals.h" /* BadDevice */ +#include "exglobals.h" /* BadDevice */ #include "xisetdevfocus.h" int SProcXISetFocus(ClientPtr client) { - char n; - REQUEST(xXISetFocusReq); - swaps(&stuff->length, n); - swaps(&stuff->deviceid, n); - swapl(&stuff->focus, n); - swapl(&stuff->time, n); + swaps(&stuff->length); + swaps(&stuff->deviceid); + swapl(&stuff->focus); + swapl(&stuff->time); return ProcXISetFocus(client); } @@ -57,11 +55,9 @@ SProcXISetFocus(ClientPtr client) int SProcXIGetFocus(ClientPtr client) { - char n; - REQUEST(xXIGetFocusReq); - swaps(&stuff->length, n); - swaps(&stuff->deviceid, n); + swaps(&stuff->length); + swaps(&stuff->deviceid); return ProcXIGetFocus(client); } @@ -77,12 +73,12 @@ ProcXISetFocus(ClientPtr client) ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetFocusAccess); if (ret != Success) - return ret; + return ret; if (!dev->focus) - return BadDevice; + return BadDevice; return SetInputFocus(client, dev, stuff->focus, RevertToParent, - stuff->time, TRUE); + stuff->time, TRUE); } int @@ -97,9 +93,9 @@ ProcXIGetFocus(ClientPtr client) ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetFocusAccess); if (ret != Success) - return ret; + return ret; if (!dev->focus) - return BadDevice; + return BadDevice; rep.repType = X_Reply; rep.RepType = X_XIGetFocus; @@ -107,24 +103,23 @@ ProcXIGetFocus(ClientPtr client) rep.sequenceNumber = client->sequence; if (dev->focus->win == NoneWin) - rep.focus = None; + rep.focus = None; else if (dev->focus->win == PointerRootWin) - rep.focus = PointerRoot; + rep.focus = PointerRoot; else if (dev->focus->win == FollowKeyboardWin) - rep.focus = FollowKeyboard; + rep.focus = FollowKeyboard; else - rep.focus = dev->focus->win->drawable.id; + rep.focus = dev->focus->win->drawable.id; WriteReplyToClient(client, sizeof(xXIGetFocusReply), &rep); return Success; } void -SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply *rep) +SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply * rep) { - char n; - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->focus, n); - WriteToClient(client, len, (char *)rep); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->focus); + WriteToClient(client, len, (char *) rep); } -- cgit v1.2.3