diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-06-10 13:21:33 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-06-10 13:21:33 +0000 |
commit | 171e929a08098b6c844887adc43879c7579dc15f (patch) | |
tree | 6b4d2e3bc20dbd4dc9a1f031416e66614c53dd21 /xserver/Xi/xisetdevfocus.c | |
parent | 68781b09de2c95b87ea898c4ecf3018dfb4460d2 (diff) |
Update to xserver 1.12.2. tested by naddy@, krw@, mpi@.
Diffstat (limited to 'xserver/Xi/xisetdevfocus.c')
-rw-r--r-- | xserver/Xi/xisetdevfocus.c | 51 |
1 files changed, 23 insertions, 28 deletions
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 <dix-config.h> #endif -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ #include <X11/extensions/XI2.h> #include <X11/extensions/XI2proto.h> -#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); } |