mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
indent fixes (OMG SO UGLY), and nuke old RCS keywords.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
/* $Xorg: getfocus.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */
|
||||
|
||||
/************************************************************
|
||||
|
||||
Copyright 1989, 1998 The Open Group
|
||||
@@ -45,7 +43,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
SOFTWARE.
|
||||
|
||||
********************************************************/
|
||||
/* $XFree86: xc/programs/Xserver/Xi/getfocus.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
@@ -59,14 +56,14 @@ SOFTWARE.
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/X.h> /* for inputstr.h */
|
||||
#include <X11/Xproto.h> /* Request macro */
|
||||
#include "windowstr.h" /* focus struct */
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/X.h> /* for inputstr.h */
|
||||
#include <X11/Xproto.h> /* Request macro */
|
||||
#include "windowstr.h" /* focus struct */
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
#include "extnsionst.h"
|
||||
#include "extinit.h" /* LookupDeviceIntRec */
|
||||
#include "extinit.h" /* LookupDeviceIntRec */
|
||||
#include "exglobals.h"
|
||||
|
||||
#include "getfocus.h"
|
||||
@@ -84,8 +81,8 @@ SProcXGetDeviceFocus(register ClientPtr client)
|
||||
|
||||
REQUEST(xGetDeviceFocusReq);
|
||||
swaps(&stuff->length, n);
|
||||
return(ProcXGetDeviceFocus(client));
|
||||
}
|
||||
return (ProcXGetDeviceFocus(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
@@ -96,19 +93,18 @@ SProcXGetDeviceFocus(register ClientPtr client)
|
||||
int
|
||||
ProcXGetDeviceFocus(ClientPtr client)
|
||||
{
|
||||
DeviceIntPtr dev;
|
||||
FocusClassPtr focus;
|
||||
DeviceIntPtr dev;
|
||||
FocusClassPtr focus;
|
||||
xGetDeviceFocusReply rep;
|
||||
|
||||
REQUEST(xGetDeviceFocusReq);
|
||||
REQUEST_SIZE_MATCH(xGetDeviceFocusReq);
|
||||
|
||||
dev = LookupDeviceIntRec (stuff->deviceid);
|
||||
if (dev == NULL || !dev->focus)
|
||||
{
|
||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||
if (dev == NULL || !dev->focus) {
|
||||
SendErrorToClient(client, IReqCode, X_GetDeviceFocus, 0, BadDevice);
|
||||
return Success;
|
||||
}
|
||||
}
|
||||
|
||||
rep.repType = X_Reply;
|
||||
rep.RepType = X_GetDeviceFocus;
|
||||
@@ -123,14 +119,14 @@ ProcXGetDeviceFocus(ClientPtr client)
|
||||
rep.focus = PointerRoot;
|
||||
else if (focus->win == FollowKeyboardWin)
|
||||
rep.focus = FollowKeyboard;
|
||||
else
|
||||
else
|
||||
rep.focus = focus->win->drawable.id;
|
||||
|
||||
rep.time = focus->time.milliseconds;
|
||||
rep.revertTo = focus->revert;
|
||||
WriteReplyToClient (client, sizeof(xGetDeviceFocusReply), &rep);
|
||||
WriteReplyToClient(client, sizeof(xGetDeviceFocusReply), &rep);
|
||||
return Success;
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
@@ -140,7 +136,7 @@ ProcXGetDeviceFocus(ClientPtr client)
|
||||
*/
|
||||
|
||||
void
|
||||
SRepXGetDeviceFocus (ClientPtr client, int size, xGetDeviceFocusReply *rep)
|
||||
SRepXGetDeviceFocus(ClientPtr client, int size, xGetDeviceFocusReply * rep)
|
||||
{
|
||||
register char n;
|
||||
|
||||
@@ -149,4 +145,4 @@ SRepXGetDeviceFocus (ClientPtr client, int size, xGetDeviceFocusReply *rep)
|
||||
swapl(&rep->focus, n);
|
||||
swapl(&rep->time, n);
|
||||
WriteToClient(client, size, (char *)rep);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user