Die XTESTEXT1, die!
This commit is contained in:
parent
fc5ca97284
commit
a73e0f8cdf
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
|||
2006-06-01 Daniel Stone <daniel@freedesktop.org>
|
||||
|
||||
* Xext/Makefile.am:
|
||||
* Xext/README.xtest1-ddx:
|
||||
* Xext/xtest1di.c:
|
||||
* Xext/xtest1dd.h:
|
||||
* Xext/xtest1dd.c:
|
||||
* Xprint/ddxInit.c:
|
||||
* hw/kdrive/src/kdrive.c:
|
||||
* hw/xfree86/common/xf86Events.c:
|
||||
* hw/xfree86/common/xf86Init.c:
|
||||
* hw/xfree86/os-support/solaris/sun_kbdEv.c:
|
||||
* hw/xnest/TestExt.c:
|
||||
* hw/xwin/InitInput.c:
|
||||
* hw/vfb/InitInput.c:
|
||||
* mi/miinitext.c:
|
||||
* os/WaitFor.c:
|
||||
Die, XTESTEXT1, die!
|
||||
|
||||
2006-05-30 Matthieu Herrb <matthieu.herrb@laas.fr>
|
||||
|
||||
* hw/xfree86/os-support/bsd/Makefile.am:
|
||||
|
|
|
@ -23,10 +23,7 @@ BUILTIN_SRCS = \
|
|||
shape.c \
|
||||
sleepuntil.c \
|
||||
sleepuntil.h \
|
||||
xtest.c \
|
||||
xtest1di.c \
|
||||
xtest1dd.c \
|
||||
xtest1dd.h
|
||||
xtest.c
|
||||
|
||||
# Sources always included in libXextmodule.la & libXext.la
|
||||
MODULE_SRCS = \
|
||||
|
@ -147,7 +144,6 @@ libXextmodule_la_SOURCES = $(MODULE_SRCS)
|
|||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
README.xtest1-ddx \
|
||||
SecurityPolicy \
|
||||
$(MITSHM_SRCS) \
|
||||
$(XV_SRCS) \
|
||||
|
|
1617
Xext/xtest1dd.c
1617
Xext/xtest1dd.c
File diff suppressed because it is too large
Load Diff
127
Xext/xtest1dd.h
127
Xext/xtest1dd.h
|
@ -1,127 +0,0 @@
|
|||
/* $XFree86: xc/programs/Xserver/Xext/xtest1dd.h,v 3.2 2001/08/01 00:44:44 tsi Exp $ */
|
||||
/************************************************************
|
||||
|
||||
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
|
||||
|
||||
All Rights Reserved
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both that copyright notice and this permission notice appear in
|
||||
supporting documentation, and that the name of the above listed
|
||||
copyright holder(s) not be used in advertising or publicity pertaining
|
||||
to distribution of the software without specific, written prior
|
||||
permission.
|
||||
|
||||
THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
|
||||
TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
|
||||
LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
********************************************************/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#ifndef XTEST1DD_H
|
||||
#define XTEST1DD_H 1
|
||||
|
||||
extern short xtest_mousex;
|
||||
extern short xtest_mousey;
|
||||
extern int playback_on;
|
||||
extern ClientPtr current_xtest_client;
|
||||
extern ClientPtr playback_client;
|
||||
extern KeyCode xtest_command_key;
|
||||
|
||||
extern void stop_stealing_input(
|
||||
void
|
||||
);
|
||||
|
||||
extern void
|
||||
steal_input(
|
||||
ClientPtr /* client */,
|
||||
CARD32 /* mode */
|
||||
);
|
||||
|
||||
extern void
|
||||
flush_input_actions(
|
||||
void
|
||||
);
|
||||
|
||||
extern void
|
||||
XTestStealJumpData(
|
||||
int /* jx */,
|
||||
int /* jy */,
|
||||
int /* dev_type */
|
||||
);
|
||||
|
||||
extern void
|
||||
XTestStealMotionData(
|
||||
int /* dx */,
|
||||
int /* dy */,
|
||||
int /* dev_type */,
|
||||
int /* mx */,
|
||||
int /* my */
|
||||
);
|
||||
|
||||
extern Bool
|
||||
XTestStealKeyData(
|
||||
unsigned /* keycode */,
|
||||
int /* keystate */,
|
||||
int /* dev_type */,
|
||||
int /* locx */,
|
||||
int /* locy */
|
||||
);
|
||||
|
||||
extern void
|
||||
parse_fake_input(
|
||||
ClientPtr /* client */,
|
||||
char * /* req */
|
||||
);
|
||||
|
||||
extern void
|
||||
XTestComputeWaitTime(
|
||||
struct timeval * /* waittime */
|
||||
);
|
||||
|
||||
extern int
|
||||
XTestProcessInputAction(
|
||||
int /* readable */,
|
||||
struct timeval * /* waittime */
|
||||
);
|
||||
|
||||
extern void
|
||||
abort_play_back(
|
||||
void
|
||||
);
|
||||
|
||||
extern void
|
||||
return_input_array_size(
|
||||
ClientPtr /* client */
|
||||
);
|
||||
|
||||
extern void XTestGenerateEvent(
|
||||
int /* dev_type */,
|
||||
int /* keycode */,
|
||||
int /* keystate */,
|
||||
int /* mousex */,
|
||||
int /* mousey */
|
||||
);
|
||||
|
||||
extern void XTestGetPointerPos(
|
||||
short * /* fmousex */,
|
||||
short * /* fmousey */
|
||||
);
|
||||
|
||||
extern void XTestJumpPointer(
|
||||
int /* jx */,
|
||||
int /* jy */,
|
||||
int /* dev_type */
|
||||
);
|
||||
|
||||
#endif /* XTEST1DD_H */
|
954
Xext/xtest1di.c
954
Xext/xtest1di.c
|
@ -1,954 +0,0 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/Xext/xtest1di.c,v 1.3 2005/04/20 12:25:12 daniels Exp $ */
|
||||
/* $Xorg: xtest1di.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */
|
||||
/*
|
||||
* File: xtest1di.c
|
||||
*
|
||||
* This file contains the device independent parts of the input
|
||||
* synthesis extension.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
|
||||
Copyright 1986, 1987, 1988, 1998 The Open Group
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
documentation for any purpose is hereby granted without fee, provided that
|
||||
the above copyright notice appear in all copies and that both that
|
||||
copyright notice and this permission notice appear in supporting
|
||||
documentation.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of The Open Group shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from The Open Group.
|
||||
|
||||
|
||||
Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation
|
||||
|
||||
Permission to use, copy, modify, and distribute this
|
||||
software and its documentation for any purpose and without
|
||||
fee is hereby granted, provided that the above copyright
|
||||
notice appear in all copies and that both that copyright
|
||||
notice and this permission notice appear in supporting
|
||||
documentation, and that the name of Hewlett-Packard not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
Hewlett-Packard makes no representations about the
|
||||
suitability of this software for any purpose. It is provided
|
||||
"as is" without express or implied warranty.
|
||||
|
||||
This software is not subject to any license of the American
|
||||
Telephone and Telegraph Company or of the Regents of the
|
||||
University of California.
|
||||
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/Xext/xtest1di.c,v 3.5 2003/09/13 21:33:03 dawes Exp $ */
|
||||
|
||||
/*****************************************************************************
|
||||
* include files
|
||||
****************************************************************************/
|
||||
|
||||
#define NEED_EVENTS
|
||||
#define NEED_REPLIES
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include "misc.h"
|
||||
#include "os.h"
|
||||
#include "gcstruct.h"
|
||||
#include "extnsionst.h"
|
||||
#include "dixstruct.h"
|
||||
#include "opaque.h"
|
||||
#define XTestSERVER_SIDE
|
||||
#include <X11/extensions/xtestext1.h>
|
||||
#include "modinit.h"
|
||||
|
||||
#include "xtest1dd.h"
|
||||
|
||||
/*****************************************************************************
|
||||
* defines
|
||||
****************************************************************************/
|
||||
|
||||
/*****************************************************************************
|
||||
* variables
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Holds the request type code for this extension. The request type code
|
||||
* for this extension may vary depending on how many extensions are installed
|
||||
* already, so the initial value given below will be added to the base request
|
||||
* code that is aquired when this extension is installed.
|
||||
*/
|
||||
static int XTestReqCode = 0;
|
||||
/*
|
||||
* Holds the two event type codes for this extension. The event type codes
|
||||
* for this extension may vary depending on how many extensions are installed
|
||||
* already, so the initial values given below will be added to the base event
|
||||
* code that is aquired when this extension is installed.
|
||||
*/
|
||||
int XTestInputActionType = 0;
|
||||
int XTestFakeAckType = 1;
|
||||
/*
|
||||
* true => monitor stealing input
|
||||
*/
|
||||
int on_steal_input = FALSE;
|
||||
/*
|
||||
* true => monitor alone getting input
|
||||
*/
|
||||
int exclusive_steal = FALSE;
|
||||
/*
|
||||
* holds the resource type assigned to this extension
|
||||
*/
|
||||
static RESTYPE XTestType;
|
||||
/*
|
||||
* holds the resource ID for the client currently using XTestGetInput
|
||||
*/
|
||||
static XID current_client_id;
|
||||
|
||||
/*****************************************************************************
|
||||
* function declarations
|
||||
****************************************************************************/
|
||||
|
||||
static DISPATCH_PROC(ProcXTestDispatch);
|
||||
static DISPATCH_PROC(SProcXTestDispatch);
|
||||
static DISPATCH_PROC(ProcTestFakeInput);
|
||||
static DISPATCH_PROC(SProcTestFakeInput);
|
||||
static DISPATCH_PROC(ProcTestGetInput);
|
||||
static DISPATCH_PROC(SProcTestGetInput);
|
||||
static DISPATCH_PROC(ProcTestStopInput);
|
||||
static DISPATCH_PROC(SProcTestStopInput);
|
||||
static DISPATCH_PROC(ProcTestReset);
|
||||
static DISPATCH_PROC(SProcTestReset);
|
||||
static DISPATCH_PROC(ProcTestQueryInputSize);
|
||||
static DISPATCH_PROC(SProcTestQueryInputSize);
|
||||
|
||||
static void XTestResetProc(
|
||||
ExtensionEntry * /* unused */
|
||||
);
|
||||
static void SReplyXTestDispatch(
|
||||
ClientPtr /* client_ptr */,
|
||||
int /* size */,
|
||||
char * /* reply_ptr */
|
||||
);
|
||||
static void SEventXTestDispatch(
|
||||
xEvent * /* from */,
|
||||
xEvent * /* to */
|
||||
);
|
||||
|
||||
static int XTestCurrentClientGone(
|
||||
pointer /* value */,
|
||||
XID /* id */
|
||||
);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* XTestExtension1Init
|
||||
*
|
||||
* Called from InitExtensions in main() or from QueryExtension() if the
|
||||
* extension is dynamically loaded.
|
||||
*
|
||||
* XTestExtension1Init has no events or errors
|
||||
* (other than the core errors).
|
||||
*/
|
||||
void
|
||||
XTestExtension1Init(INITARGS)
|
||||
{
|
||||
/*
|
||||
* holds the pointer to the extension entry structure
|
||||
*/
|
||||
ExtensionEntry *extEntry;
|
||||
|
||||
extEntry = AddExtension(XTestEXTENSION_NAME,
|
||||
XTestEVENT_COUNT,
|
||||
0,
|
||||
ProcXTestDispatch,
|
||||
SProcXTestDispatch,
|
||||
XTestResetProc,
|
||||
StandardMinorOpcode);
|
||||
if (extEntry)
|
||||
{
|
||||
/*
|
||||
* remember the request code assigned to this extension
|
||||
*/
|
||||
XTestReqCode = extEntry->base;
|
||||
/*
|
||||
* make an atom saying that this extension is present
|
||||
*/
|
||||
(void) MakeAtom(XTestEXTENSION_NAME,
|
||||
strlen(XTestEXTENSION_NAME),
|
||||
TRUE);
|
||||
/*
|
||||
* remember the event codes assigned to this extension
|
||||
*/
|
||||
XTestInputActionType += extEntry->eventBase;
|
||||
XTestFakeAckType += extEntry->eventBase;
|
||||
/*
|
||||
* install the routine to handle byte-swapping the replies
|
||||
* for this extension in the ReplySwapVector table
|
||||
*/
|
||||
ReplySwapVector[XTestReqCode] = (ReplySwapPtr) SReplyXTestDispatch;
|
||||
/*
|
||||
* install the routine to handle byte-swapping the events
|
||||
* for this extension in the EventSwapVector table
|
||||
*/
|
||||
EventSwapVector[XTestInputActionType] = SEventXTestDispatch;
|
||||
EventSwapVector[XTestFakeAckType] = SEventXTestDispatch;
|
||||
/*
|
||||
* get the resource type for this extension
|
||||
*/
|
||||
XTestType = CreateNewResourceType(XTestCurrentClientGone);
|
||||
if (XTestType == 0)
|
||||
{
|
||||
FatalError("XTestExtension1Init: CreateNewResourceType failed\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalError("XTestExtension1Init: AddExtensions failed\n");
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* ProcXTestDispatch
|
||||
*
|
||||
*
|
||||
*/
|
||||
static int
|
||||
ProcXTestDispatch(client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
REQUEST(xReq);
|
||||
if (stuff->data == X_TestFakeInput)
|
||||
{
|
||||
return(ProcTestFakeInput(client));
|
||||
}
|
||||
else if (stuff->data == X_TestGetInput)
|
||||
{
|
||||
return(ProcTestGetInput(client));
|
||||
}
|
||||
else if (stuff->data == X_TestStopInput)
|
||||
{
|
||||
return(ProcTestStopInput(client));
|
||||
}
|
||||
else if (stuff->data == X_TestReset)
|
||||
{
|
||||
return(ProcTestReset(client));
|
||||
}
|
||||
else if (stuff->data == X_TestQueryInputSize)
|
||||
{
|
||||
return(ProcTestQueryInputSize(client));
|
||||
}
|
||||
else
|
||||
{
|
||||
SendErrorToClient(client,
|
||||
XTestReqCode,
|
||||
stuff->data,
|
||||
None,
|
||||
BadRequest);
|
||||
return(BadRequest);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* SProcXTestDispatch
|
||||
*
|
||||
*
|
||||
*/
|
||||
static int
|
||||
SProcXTestDispatch(client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
REQUEST(xReq);
|
||||
if (stuff->data == X_TestFakeInput)
|
||||
{
|
||||
return(SProcTestFakeInput(client));
|
||||
}
|
||||
else if (stuff->data == X_TestGetInput)
|
||||
{
|
||||
return(SProcTestGetInput(client));
|
||||
}
|
||||
else if (stuff->data == X_TestStopInput)
|
||||
{
|
||||
return(SProcTestStopInput(client));
|
||||
}
|
||||
else if (stuff->data == X_TestReset)
|
||||
{
|
||||
return(SProcTestReset(client));
|
||||
}
|
||||
else if (stuff->data == X_TestQueryInputSize)
|
||||
{
|
||||
return(SProcTestQueryInputSize(client));
|
||||
}
|
||||
else
|
||||
{
|
||||
SendErrorToClient(client,
|
||||
XTestReqCode,
|
||||
stuff->data,
|
||||
None,
|
||||
BadRequest);
|
||||
return(BadRequest);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* SProcTestFakeInput
|
||||
*
|
||||
*
|
||||
*/
|
||||
static int
|
||||
SProcTestFakeInput(client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
/*
|
||||
* used in the swaps and swapl macros for temporary storage space
|
||||
*/
|
||||
register char n;
|
||||
/*
|
||||
* index counter
|
||||
*/
|
||||
int i;
|
||||
/*
|
||||
* pointer to the next input action in the request
|
||||
*/
|
||||
CARD8 *input_action_ptr;
|
||||
/*
|
||||
* holds the type of the next input action in the request
|
||||
*/
|
||||
int input_action_type;
|
||||
|
||||
REQUEST(xTestFakeInputReq);
|
||||
/*
|
||||
* byte-swap the fields in the request
|
||||
*/
|
||||
swaps(&stuff->length, n);
|
||||
swapl(&stuff->ack, n);
|
||||
/*
|
||||
* have to parse and then byte-swap the input action list here
|
||||
*/
|
||||
for (i = 0; i < XTestMAX_ACTION_LIST_SIZE;)
|
||||
{
|
||||
/*
|
||||
* point to the next input action in the request
|
||||
*/
|
||||
input_action_ptr = &(((xTestFakeInputReq *) stuff)->action_list[i]);
|
||||
/*
|
||||
* figure out what type of input action it is
|
||||
*/
|
||||
input_action_type = (*input_action_ptr) & XTestACTION_TYPE_MASK;
|
||||
/*
|
||||
* byte-swap the input action according to it's type
|
||||
*/
|
||||
switch (input_action_type)
|
||||
{
|
||||
case XTestKEY_ACTION:
|
||||
/*
|
||||
* byte-swap the delay_time field
|
||||
*/
|
||||
swaps(&(((XTestKeyInfo *) input_action_ptr)->delay_time), n);
|
||||
/*
|
||||
* advance to the next input action
|
||||
*/
|
||||
i += sizeof(XTestKeyInfo);
|
||||
break;
|
||||
case XTestMOTION_ACTION:
|
||||
/*
|
||||
* byte-swap the delay_time field
|
||||
*/
|
||||
swaps(&(((XTestMotionInfo *) input_action_ptr)->delay_time), n);
|
||||
/*
|
||||
* advance to the next input action
|
||||
*/
|
||||
i += sizeof(XTestMotionInfo);
|
||||
break;
|
||||
case XTestJUMP_ACTION:
|
||||
/*
|
||||
* byte-swap the jumpx field
|
||||
*/
|
||||
swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpx), n);
|
||||
/*
|
||||
* byte-swap the jumpy field
|
||||
*/
|
||||
swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpy), n);
|
||||
/*
|
||||
* byte-swap the delay_time field
|
||||
*/
|
||||
swaps(&(((XTestJumpInfo *) input_action_ptr)->delay_time), n);
|
||||
/*
|
||||
* advance to the next input action
|
||||
*/
|
||||
i += sizeof(XTestJumpInfo);
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* if this is a delay input action, then byte-swap it,
|
||||
* otherwise we have reached the end of the input
|
||||
* actions in this request
|
||||
*/
|
||||
if (XTestUnpackDeviceID(*input_action_ptr) ==
|
||||
XTestDELAY_DEVICE_ID)
|
||||
{
|
||||
/*
|
||||
* byte-swap the delay_time field
|
||||
*/
|
||||
swapl(&(((XTestDelayInfo *) input_action_ptr)->delay_time), n);
|
||||
/*
|
||||
* advance to the next input action
|
||||
*/
|
||||
i += sizeof(XTestDelayInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* if the input action header byte is 0 or
|
||||
* ill-formed, then there are no more input
|
||||
* actions in this request
|
||||
*/
|
||||
i = XTestMAX_ACTION_LIST_SIZE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return(ProcTestFakeInput(client));
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* SProcTestGetInput
|
||||
*
|
||||
*
|
||||
*/
|
||||
static int
|
||||
SProcTestGetInput(client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
/*
|
||||
* used in the swaps and swapl macros for temporary storage space
|
||||
*/
|
||||
register char n;
|
||||
|
||||
REQUEST(xTestGetInputReq);
|
||||
/*
|
||||
* byte-swap the fields in the request
|
||||
*/
|
||||
swaps(&stuff->length, n);
|
||||
swapl(&stuff->mode, n);
|
||||
return(ProcTestGetInput(client));
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* SProcTestStopInput
|
||||
*
|
||||
*
|
||||
*/
|
||||
static int
|
||||
SProcTestStopInput(client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
/*
|
||||
* used in the swaps and swapl macros for temporary storage space
|
||||
*/
|
||||
register char n;
|
||||
|
||||
REQUEST(xTestStopInputReq);
|
||||
/*
|
||||
* byte-swap the length field in the request
|
||||
*/
|
||||
swaps(&stuff->length, n);
|
||||
return(ProcTestStopInput(client));
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* SProcTestReset
|
||||
*
|
||||
*
|
||||
*/
|
||||
static int
|
||||
SProcTestReset(client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
/*
|
||||
* used in the swaps and swapl macros for temporary storage space
|
||||
*/
|
||||
register char n;
|
||||
|
||||
REQUEST(xTestResetReq);
|
||||
/*
|
||||
* byte-swap the length field in the request
|
||||
*/
|
||||
swaps(&stuff->length, n);
|
||||
return(ProcTestReset(client));
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* SProcTestQueryInputSize
|
||||
*
|
||||
*
|
||||
*/
|
||||
static int
|
||||
SProcTestQueryInputSize(client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
/*
|
||||
* used in the swaps and swapl macros for temporary storage space
|
||||
*/
|
||||
register char n;
|
||||
|
||||
REQUEST(xTestQueryInputSizeReq);
|
||||
/*
|
||||
* byte-swap the length field in the request
|
||||
*/
|
||||
swaps(&stuff->length, n);
|
||||
return(ProcTestQueryInputSize(client));
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* ProcTestFakeInput
|
||||
*
|
||||
*
|
||||
*/
|
||||
static int
|
||||
ProcTestFakeInput(client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
REQUEST(xTestFakeInputReq);
|
||||
REQUEST_SIZE_MATCH(xTestFakeInputReq);
|
||||
|
||||
if (playback_client == NULL)
|
||||
{
|
||||
playback_client = client;
|
||||
current_client_id = FakeClientID(client->index);
|
||||
AddResource(current_client_id,
|
||||
XTestType,
|
||||
0);
|
||||
MakeClientGrabImpervious(client);
|
||||
}
|
||||
if (playback_client == client)
|
||||
{
|
||||
/*
|
||||
* This extension does not need to clean up any
|
||||
* server state when a client using this function
|
||||
* "goes away". The server will just process any
|
||||
* input actions that have already been sent to it,
|
||||
* and will then reset its association with a client.
|
||||
*/
|
||||
parse_fake_input(client, (char *)stuff);
|
||||
return(Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* this is a request by another client to send fake
|
||||
* input while the server is still being used
|
||||
*/
|
||||
SendErrorToClient(client,
|
||||
XTestReqCode,
|
||||
X_TestFakeInput,
|
||||
None,
|
||||
BadAccess);
|
||||
return(BadAccess);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* ProcTestGetInput
|
||||
*
|
||||
*
|
||||
*/
|
||||
static int
|
||||
ProcTestGetInput(client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
REQUEST(xTestGetInputReq);
|
||||
REQUEST_SIZE_MATCH(xTestGetInputReq);
|
||||
if (on_steal_input)
|
||||
{
|
||||
/*
|
||||
* this is a request by another client to get fake input
|
||||
* while the server is still sending input to the first client
|
||||
*/
|
||||
SendErrorToClient(client,
|
||||
XTestReqCode,
|
||||
X_TestGetInput,
|
||||
None,
|
||||
BadAccess);
|
||||
return(BadAccess);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Set up a resource associated with the client using this
|
||||
* function so that this extension gets called when the
|
||||
* client "goes away". This allows this extension to
|
||||
* clean up the server state.
|
||||
*/
|
||||
current_client_id = FakeClientID(client->index);
|
||||
AddResource(current_client_id,
|
||||
XTestType,
|
||||
0);
|
||||
/*
|
||||
* indicate that a client is stealing input
|
||||
*/
|
||||
on_steal_input = TRUE;
|
||||
if ((stuff->mode & XTestEXCLUSIVE) == 0)
|
||||
{
|
||||
exclusive_steal = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
exclusive_steal = TRUE;
|
||||
}
|
||||
steal_input(client, stuff->mode);
|
||||
return(Success);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* ProcTestStopInput
|
||||
*
|
||||
*
|
||||
*/
|
||||
static int
|
||||
ProcTestStopInput(client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
REQUEST_SIZE_MATCH(xTestStopInputReq);
|
||||
if (on_steal_input && (current_xtest_client == client))
|
||||
{
|
||||
on_steal_input = FALSE;
|
||||
exclusive_steal = FALSE;
|
||||
stop_stealing_input();
|
||||
/*
|
||||
* remove the resource associated with this client
|
||||
*/
|
||||
FreeResource(current_client_id, RT_NONE);
|
||||
return(Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* this is a request to stop fake input when fake input has
|
||||
* never been started or from a client that hasn't started
|
||||
* fake input
|
||||
*/
|
||||
SendErrorToClient(client,
|
||||
XTestReqCode,
|
||||
X_TestStopInput,
|
||||
None,
|
||||
BadAccess);
|
||||
return(BadAccess);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* ProcTestReset
|
||||
*
|
||||
*
|
||||
*/
|
||||
static int
|
||||
ProcTestReset(client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
REQUEST_SIZE_MATCH(xTestResetReq);
|
||||
on_steal_input = FALSE;
|
||||
exclusive_steal = FALSE;
|
||||
/*
|
||||
* defined in xtest1dd.c
|
||||
*/
|
||||
stop_stealing_input();
|
||||
/*
|
||||
* defined in xtest1dd.c
|
||||
*/
|
||||
abort_play_back();
|
||||
return(Success);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* ProcTestQueryInputSize
|
||||
*
|
||||
*
|
||||
*/
|
||||
static int
|
||||
ProcTestQueryInputSize(client)
|
||||
register ClientPtr client;
|
||||
{
|
||||
REQUEST_SIZE_MATCH(xTestQueryInputSizeReq);
|
||||
/*
|
||||
* defined in xtest1dd.c
|
||||
*/
|
||||
return_input_array_size(client);
|
||||
return(Success);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* XTestResetProc
|
||||
*
|
||||
* This function is called by the server when the server has no clients
|
||||
* connected to it. It must put eveything back the way it was before
|
||||
* this extension was installed.
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
XTestResetProc(unused)
|
||||
ExtensionEntry * unused;
|
||||
{
|
||||
/*
|
||||
* remove the routine to handle byte-swapping the replies
|
||||
* for this extension in the ReplySwapVector table
|
||||
*/
|
||||
ReplySwapVector[XTestReqCode] = ReplyNotSwappd;
|
||||
/*
|
||||
* remove the routine to handle byte-swapping the events
|
||||
* for this extension in the EventSwapVector table
|
||||
*/
|
||||
EventSwapVector[XTestInputActionType] = NotImplemented;
|
||||
EventSwapVector[XTestFakeAckType] = NotImplemented;
|
||||
/*
|
||||
* reset the variables initialized just once at load time
|
||||
*/
|
||||
XTestReqCode = 0;
|
||||
XTestInputActionType = 0;
|
||||
XTestFakeAckType = 1;
|
||||
on_steal_input = FALSE;
|
||||
exclusive_steal = FALSE;
|
||||
playback_client = 0; /* Don't really need this but it looks nice */
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* PXTestCurrentClientGone
|
||||
*
|
||||
* This routine is called when a client that has asked for input actions
|
||||
* to be sent to it "goes away". This routine must clean up the
|
||||
* server state.
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
XTestCurrentClientGone(value, id)
|
||||
pointer value;
|
||||
XID id;
|
||||
{
|
||||
/*
|
||||
* defined in xtest1dd.c
|
||||
*/
|
||||
on_steal_input = FALSE;
|
||||
exclusive_steal = FALSE;
|
||||
/*
|
||||
* defined in xtestdd.c
|
||||
*/
|
||||
playback_client = 0;
|
||||
abort_play_back();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* SReplyXTestDispatch
|
||||
*
|
||||
* Swap any replies defined in this extension.
|
||||
*/
|
||||
static void
|
||||
SReplyXTestDispatch(client_ptr, size, reply_ptr)
|
||||
ClientPtr client_ptr;
|
||||
int size;
|
||||
char *reply_ptr;
|
||||
{
|
||||
/*
|
||||
* used in the swaps and swapl macros for temporary storage space
|
||||
*/
|
||||
register char n;
|
||||
/*
|
||||
* pointer to xTestQueryInputSizeReply
|
||||
*/
|
||||
xTestQueryInputSizeReply *rep_ptr;
|
||||
|
||||
/*
|
||||
* there is only one reply in this extension, so byte-swap it
|
||||
*/
|
||||
rep_ptr = (xTestQueryInputSizeReply *) reply_ptr;
|
||||
swaps(&(rep_ptr->sequenceNumber), n);
|
||||
swapl(&(rep_ptr->length), n);
|
||||
swapl(&(rep_ptr->size_return), n);
|
||||
/*
|
||||
* now write the swapped reply to the client
|
||||
*/
|
||||
WriteToClient(client_ptr, size, reply_ptr);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* SEventXTestDispatch
|
||||
*
|
||||
* Swap any events defined in this extension.
|
||||
*/
|
||||
static void
|
||||
SEventXTestDispatch(from, to)
|
||||
xEvent *from;
|
||||
xEvent *to;
|
||||
{
|
||||
/*
|
||||
* used in the swaps and swapl macros for temporary storage space
|
||||
*/
|
||||
register char n;
|
||||
/*
|
||||
* index counter
|
||||
*/
|
||||
int i;
|
||||
/*
|
||||
* pointer to the next input action in the event
|
||||
*/
|
||||
CARD8 *input_action_ptr;
|
||||
/*
|
||||
* holds the type of the next input action in the event
|
||||
*/
|
||||
int input_action_type;
|
||||
|
||||
|
||||
/*
|
||||
* copy the type information from the "from" event to the "to" event
|
||||
*/
|
||||
((xTestInputActionEvent *) to)->type =
|
||||
((xTestInputActionEvent *) from)->type;
|
||||
/*
|
||||
* copy the sequence number information from the "from" event to the
|
||||
* "to" event
|
||||
*/
|
||||
((xTestInputActionEvent *) to)->sequenceNumber =
|
||||
((xTestInputActionEvent *) from)->sequenceNumber;
|
||||
/*
|
||||
* byte-swap the sequence number in the "to" event
|
||||
*/
|
||||
swaps(&(((xTestInputActionEvent *) to)->sequenceNumber), n);
|
||||
/*
|
||||
* If the event is an xTestInputActionEvent, then it needs more
|
||||
* processing. Otherwise, it is an xTestFakeAckEvent, which
|
||||
* has no other information in it.
|
||||
*/
|
||||
if ((((xTestInputActionEvent *) to)->type & 0x7f) ==
|
||||
XTestInputActionType)
|
||||
{
|
||||
/*
|
||||
* copy the input actions from the "from" event
|
||||
* to the "to" event
|
||||
*/
|
||||
for (i = 0; i < XTestACTIONS_SIZE; i++)
|
||||
{
|
||||
((xTestInputActionEvent *) to)->actions[i] =
|
||||
((xTestInputActionEvent *) from)->actions[i];
|
||||
}
|
||||
/*
|
||||
* byte-swap the input actions in the "to" event
|
||||
*/
|
||||
for (i = 0; i < XTestACTIONS_SIZE; i++)
|
||||
{
|
||||
/*
|
||||
* point to the next input action in the event
|
||||
*/
|
||||
input_action_ptr = &(((xTestInputActionEvent *) to)->actions[i]);
|
||||
/*
|
||||
* figure out what type of input action it is
|
||||
*/
|
||||
input_action_type = (*input_action_ptr) &
|
||||
XTestACTION_TYPE_MASK;
|
||||
/*
|
||||
* byte-swap the input action according to it's type
|
||||
*/
|
||||
switch (input_action_type)
|
||||
{
|
||||
case XTestKEY_ACTION:
|
||||
/*
|
||||
* byte-swap the delay_time field
|
||||
*/
|
||||
swaps(&(((XTestKeyInfo *) input_action_ptr)->delay_time), n);
|
||||
/*
|
||||
* advance to the next input action
|
||||
*/
|
||||
i += sizeof(XTestKeyInfo);
|
||||
break;
|
||||
case XTestMOTION_ACTION:
|
||||
/*
|
||||
* byte-swap the delay_time field
|
||||
*/
|
||||
swaps(&(((XTestMotionInfo *) input_action_ptr)->delay_time), n);
|
||||
/*
|
||||
* advance to the next input action
|
||||
*/
|
||||
i += sizeof(XTestMotionInfo);
|
||||
break;
|
||||
case XTestJUMP_ACTION:
|
||||
/*
|
||||
* byte-swap the jumpx field
|
||||
*/
|
||||
swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpx), n);
|
||||
/*
|
||||
* byte-swap the jumpy field
|
||||
*/
|
||||
swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpy), n);
|
||||
/*
|
||||
* byte-swap the delay_time field
|
||||
*/
|
||||
swaps(&(((XTestJumpInfo *) input_action_ptr)->delay_time), n);
|
||||
/*
|
||||
* advance to the next input action
|
||||
*/
|
||||
i += sizeof(XTestJumpInfo);
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* if this is a delay input action, then
|
||||
* byte-swap it, otherwise we have reached the
|
||||
* end of the input actions in this event
|
||||
*/
|
||||
if (XTestUnpackDeviceID(*input_action_ptr) ==
|
||||
XTestDELAY_DEVICE_ID)
|
||||
{
|
||||
/*
|
||||
* byte-swap the delay_time field
|
||||
*/
|
||||
swapl(&(((XTestDelayInfo *) input_action_ptr)->delay_time), n);
|
||||
/*
|
||||
* advance to the next input action
|
||||
*/
|
||||
i += sizeof(XTestDelayInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* if the input action header byte is 0
|
||||
* or ill-formed, then there are no
|
||||
* more input actions in this event
|
||||
*/
|
||||
i = XTestACTIONS_SIZE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -371,28 +371,6 @@ SetDeviceValuators (
|
|||
|
||||
#endif /* XINPUT */
|
||||
|
||||
#ifdef XTESTEXT1
|
||||
|
||||
void
|
||||
XTestJumpPointer(int x, int y, int dev)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
XTestGetPointerPos(int x, int y)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
XTestGenerateEvent(int dev, int keycode, int keystate, int x, int y)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* XTESTEXT1 */
|
||||
|
||||
#ifdef AIXV3
|
||||
/*
|
||||
* This is just to get the server to link on AIX, where some bits
|
||||
|
|
|
@ -1466,32 +1466,6 @@ KdInitOutput (ScreenInfo *pScreenInfo,
|
|||
KdAddScreen (pScreenInfo, screen, argc, argv);
|
||||
}
|
||||
|
||||
#ifdef XTESTEXT1
|
||||
void
|
||||
XTestGenerateEvent(dev_type, keycode, keystate, mousex, mousey)
|
||||
int dev_type;
|
||||
int keycode;
|
||||
int keystate;
|
||||
int mousex;
|
||||
int mousey;
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
XTestGetPointerPos(fmousex, fmousey)
|
||||
short *fmousex, *fmousey;
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
XTestJumpPointer(jx, jy, dev_type)
|
||||
int jx;
|
||||
int jy;
|
||||
int dev_type;
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DPMSExtension
|
||||
void
|
||||
DPMSSet(int level)
|
||||
|
|
|
@ -323,22 +323,3 @@ InitInput(int argc, char *argv[])
|
|||
miRegisterPointerDevice(screenInfo.screens[0], p);
|
||||
(void)mieqInit ((DevicePtr) k, (DevicePtr) p);
|
||||
}
|
||||
|
||||
#ifdef XTESTEXT1
|
||||
void
|
||||
XTestGenerateEvent(int dev_type, int keycode, int keystate, int mousex,
|
||||
int mousey)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
XTestGetPointerPos(short *fmousex, short *fmousey)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
XTestJumpPointer(int jx, int jy, int dev_type)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
*/
|
||||
|
||||
/* $XConsortium: xf86Events.c /main/46 1996/10/25 11:36:30 kaleb $ */
|
||||
/* $XdotOrg: xserver/xorg/hw/xfree86/common/xf86Events.c,v 1.21 2005/11/08 06:33:28 jkj Exp $ */
|
||||
/* $XdotOrg: xserver/xorg/hw/xfree86/common/xf86Events.c,v 1.22 2006/03/25 19:52:03 ajax Exp $ */
|
||||
|
||||
/* [JCH-96/01/21] Extended std reverse map to four buttons. */
|
||||
|
||||
|
@ -120,31 +120,11 @@ extern Bool noXkbExtension;
|
|||
xf86UnblockSIGIO(__sigstate); \
|
||||
}
|
||||
|
||||
#ifdef XTESTEXT1
|
||||
|
||||
#define XTestSERVER_SIDE
|
||||
#include <X11/extensions/xtestext1.h>
|
||||
extern short xtest_mousex;
|
||||
extern short xtest_mousey;
|
||||
extern int on_steal_input;
|
||||
extern Bool XTestStealKeyData();
|
||||
extern void XTestStealMotionData();
|
||||
#define ENQUEUE(ev, code, direction, dev_type) \
|
||||
(ev)->u.u.detail = (code); \
|
||||
(ev)->u.u.type = (direction); \
|
||||
if (!on_steal_input || \
|
||||
XTestStealKeyData((ev)->u.u.detail, (ev)->u.u.type, dev_type, \
|
||||
xtest_mousex, xtest_mousey)) \
|
||||
EqEnqueue((ev))
|
||||
#else /* ! XTESTEXT1 */
|
||||
|
||||
#define ENQUEUE(ev, code, direction, dev_type) \
|
||||
(ev)->u.u.detail = (code); \
|
||||
(ev)->u.u.type = (direction); \
|
||||
EqEnqueue((ev))
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The first of many hacks to get VT switching to work under
|
||||
* Solaris 2.1 for x86. The basic problem is that Solaris is supposed
|
||||
|
@ -1773,49 +1753,6 @@ xf86EnableVTSwitch(Bool new)
|
|||
return old;
|
||||
}
|
||||
|
||||
#ifdef XTESTEXT1
|
||||
|
||||
void
|
||||
XTestGetPointerPos(short *fmousex, short *fmousey)
|
||||
{
|
||||
int x,y;
|
||||
|
||||
miPointerPosition(&x, &y);
|
||||
*fmousex = x;
|
||||
*fmousey = y;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
XTestJumpPointer(int jx, int jy, int dev_type)
|
||||
{
|
||||
miPointerAbsoluteCursor(jx, jy, GetTimeInMillis() );
|
||||
}
|
||||
|
||||
void
|
||||
XTestGenerateEvent(int dev_type, int keycode, int keystate, int mousex,
|
||||
int mousey)
|
||||
{
|
||||
xEvent tevent;
|
||||
|
||||
tevent.u.u.type = (dev_type == XE_POINTER) ?
|
||||
(keystate == XTestKEY_UP) ? ButtonRelease : ButtonPress :
|
||||
(keystate == XTestKEY_UP) ? KeyRelease : KeyPress;
|
||||
tevent.u.u.detail = keycode;
|
||||
tevent.u.keyButtonPointer.rootX = mousex;
|
||||
tevent.u.keyButtonPointer.rootY = mousey;
|
||||
tevent.u.keyButtonPointer.time = xf86Info.lastEventTime = GetTimeInMillis();
|
||||
#ifdef XINPUT
|
||||
xf86eqEnqueue(&tevent);
|
||||
#else
|
||||
mieqEnqueue(&tevent);
|
||||
#endif
|
||||
xf86Info.inputPending = TRUE; /* virtual event */
|
||||
}
|
||||
|
||||
#endif /* XTESTEXT1 */
|
||||
|
||||
void
|
||||
xf86ReloadInputDevs(int sig)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Init.c,v 3.212 2004/01/27 01:31:45 dawes Exp $ */
|
||||
/* $XdotOrg: xserver/xorg/hw/xfree86/common/xf86Init.c,v 1.34 2006/04/04 14:17:04 ajax Exp $ */
|
||||
/* $XdotOrg: xserver/xorg/hw/xfree86/common/xf86Init.c,v 1.35 2006/05/09 18:04:29 ajax Exp $ */
|
||||
|
||||
/*
|
||||
* Loosely based on code bearing the following copyright:
|
||||
|
@ -93,11 +93,6 @@
|
|||
|
||||
#include "globals.h"
|
||||
|
||||
#ifdef XTESTEXT1
|
||||
#include "atKeynames.h"
|
||||
extern int xtest_command_key;
|
||||
#endif /* XTESTEXT1 */
|
||||
|
||||
#ifdef DPMSExtension
|
||||
#define DPMS_SERVER
|
||||
#include <X11/extensions/dpms.h>
|
||||
|
@ -1038,9 +1033,6 @@ InitInput(argc, argv)
|
|||
|
||||
xf86Info.vtRequestsPending = FALSE;
|
||||
xf86Info.inputPending = FALSE;
|
||||
#ifdef XTESTEXT1
|
||||
xtest_command_key = KEY_Begin + MIN_KEYCODE;
|
||||
#endif /* XTESTEXT1 */
|
||||
|
||||
if (serverGeneration == 1) {
|
||||
/* Call the PreInit function for each input device instance. */
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
/* [JCH-96/01/21] Extended std reverse map to four buttons. */
|
||||
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_kbdEv.c,v 1.5 2005/05/21 07:46:37 alanc Exp $ */
|
||||
/* $XdotOrg: xserver/xorg/hw/xfree86/os-support/solaris/sun_kbdEv.c,v 1.10 2005/12/12 23:33:55 alanc Exp $ */
|
||||
|
||||
#ifdef HAVE_XORG_CONFIG_H
|
||||
#include <xorg-config.h>
|
||||
|
@ -52,36 +52,6 @@ extern Bool noXkbExtension;
|
|||
#define XE_POINTER 1
|
||||
#define XE_KEYBOARD 2
|
||||
|
||||
#ifdef XTESTEXT1
|
||||
|
||||
#define XTestSERVER_SIDE
|
||||
#include <X11/extensions/xtestext1.h>
|
||||
extern short xtest_mousex;
|
||||
extern short xtest_mousey;
|
||||
extern int on_steal_input;
|
||||
extern Bool XTestStealKeyData();
|
||||
extern void XTestStealMotionData();
|
||||
|
||||
#ifdef XINPUT
|
||||
#define ENQUEUE(ev, code, direction, dev_type) \
|
||||
(ev)->u.u.detail = (code); \
|
||||
(ev)->u.u.type = (direction); \
|
||||
if (!on_steal_input || \
|
||||
XTestStealKeyData((ev)->u.u.detail, (ev)->u.u.type, dev_type, \
|
||||
xtest_mousex, xtest_mousey)) \
|
||||
xf86eqEnqueue((ev))
|
||||
#else
|
||||
#define ENQUEUE(ev, code, direction, dev_type) \
|
||||
(ev)->u.u.detail = (code); \
|
||||
(ev)->u.u.type = (direction); \
|
||||
if (!on_steal_input || \
|
||||
XTestStealKeyData((ev)->u.u.detail, (ev)->u.u.type, dev_type, \
|
||||
xtest_mousex, xtest_mousey)) \
|
||||
mieqEnqueue((ev))
|
||||
#endif
|
||||
|
||||
#else /* ! XTESTEXT1 */
|
||||
|
||||
#ifdef XINPUT
|
||||
#define ENQUEUE(ev, code, direction, dev_type) \
|
||||
(ev)->u.u.detail = (code); \
|
||||
|
@ -94,8 +64,6 @@ extern void XTestStealMotionData();
|
|||
mieqEnqueue((ev))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
static void startautorepeat(long keycode);
|
||||
static CARD32 processautorepeat(OsTimerPtr timer, CARD32 now, pointer arg);
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ SRCS = Args.c \
|
|||
Pointer.h \
|
||||
Screen.c \
|
||||
Screen.h \
|
||||
TestExt.c \
|
||||
Visual.c \
|
||||
Visual.h \
|
||||
Window.c \
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
/* $Xorg: TestExt.c,v 1.3 2000/08/17 19:53:28 cpqbld Exp $ */
|
||||
/*
|
||||
|
||||
Copyright 1993 by Davor Matic
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software
|
||||
and its documentation for any purpose is hereby granted without fee,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both that copyright notice and this permission notice appear in
|
||||
supporting documentation. Davor Matic makes no representations about
|
||||
the suitability of this software for any purpose. It is provided "as
|
||||
is" without express or implied warranty.
|
||||
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/hw/xnest/TestExt.c,v 3.5 2001/08/27 17:41:00 dawes Exp $ */
|
||||
|
||||
#ifdef HAVE_XNEST_CONFIG_H
|
||||
#include <xnest-config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/Xlib.h>
|
||||
#undef Bool
|
||||
#include "screenint.h"
|
||||
#include "input.h"
|
||||
#include "misc.h"
|
||||
#include "scrnintstr.h"
|
||||
#include "servermd.h"
|
||||
#include "mipointer.h"
|
||||
#define XTestSERVER_SIDE
|
||||
#include <X11/extensions/xtestext1.h>
|
||||
#include "xtest1dd.h"
|
||||
|
||||
extern CARD32 lastEventTime;
|
||||
|
||||
void
|
||||
XTestGetPointerPos(short *fmousex, short *fmousey)
|
||||
{
|
||||
int x,y;
|
||||
|
||||
miPointerPosition(&x, &y);
|
||||
*fmousex = x;
|
||||
*fmousey = y;
|
||||
}
|
||||
|
||||
void
|
||||
XTestJumpPointer(int jx, int jy, int dev_type)
|
||||
{
|
||||
miPointerAbsoluteCursor(jx, jy, GetTimeInMillis());
|
||||
}
|
||||
|
||||
void
|
||||
XTestGenerateEvent(int dev_type, int keycode, int keystate, int mousex,
|
||||
int mousey)
|
||||
{
|
||||
/*
|
||||
xEvent tevent;
|
||||
|
||||
tevent.u.u.type = (dev_type == XE_POINTER) ?
|
||||
(keystate == XTestKEY_UP) ? ButtonRelease : ButtonPress :
|
||||
(keystate == XTestKEY_UP) ? KeyRelease : KeyPress;
|
||||
tevent.u.u.detail = keycode;
|
||||
tevent.u.keyButtonPointer.rootX = mousex;
|
||||
tevent.u.keyButtonPointer.rootY = mousey;
|
||||
tevent.u.keyButtonPointer.time = lastEventTime = GetTimeInMillis();
|
||||
mieqEnqueue(&tevent);
|
||||
*/
|
||||
}
|
|
@ -177,28 +177,3 @@ InitInput (int argc, char *argv[])
|
|||
winDebug ("InitInput - returning\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef XTESTEXT1
|
||||
void
|
||||
XTestGenerateEvent (int dev_type, int keycode, int keystate,
|
||||
int mousex, int mousey)
|
||||
{
|
||||
ErrorF ("XTestGenerateEvent\n");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
XTestGetPointerPos (short *fmousex, short *fmousey)
|
||||
{
|
||||
ErrorF ("XTestGetPointerPos\n");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
XTestJumpPointer (int jx, int jy, int dev_type)
|
||||
{
|
||||
ErrorF ("XTestJumpPointer\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xserver/xorg/mi/miinitext.c,v 1.31 2006/02/15 19:05:54 ajax Exp $ */
|
||||
/* $XdotOrg: xserver/xorg/mi/miinitext.c,v 1.32 2006/03/12 00:11:34 krh Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/mi/miinitext.c,v 3.67 2003/01/12 02:44:27 dawes Exp $ */
|
||||
/***********************************************************
|
||||
|
||||
|
@ -267,9 +267,6 @@ typedef void (*InitExtension)(INITARGS);
|
|||
#endif
|
||||
|
||||
/* FIXME: this whole block of externs should be from the appropriate headers */
|
||||
#ifdef XTESTEXT1
|
||||
extern void XTestExtension1Init(INITARGS);
|
||||
#endif
|
||||
#ifdef SHAPE
|
||||
extern void ShapeExtensionInit(INITARGS);
|
||||
#endif
|
||||
|
@ -550,9 +547,6 @@ InitExtensions(argc, argv)
|
|||
if (!noPanoramiXExtension) PanoramiXExtensionInit();
|
||||
# endif
|
||||
#endif
|
||||
#ifdef XTESTEXT1
|
||||
if (!noTestExtensions) XTestExtension1Init();
|
||||
#endif
|
||||
#ifdef SHAPE
|
||||
if (!noShapeExtension) ShapeExtensionInit();
|
||||
#endif
|
||||
|
@ -697,9 +691,6 @@ InitVisualWrap()
|
|||
#else /* XFree86LOADER */
|
||||
/* List of built-in (statically linked) extensions */
|
||||
static ExtensionModule staticExtensions[] = {
|
||||
#ifdef XTESTEXT1
|
||||
{ XTestExtension1Init, "XTEST1", &noTestExtensions, NULL, NULL },
|
||||
#endif
|
||||
#ifdef MITSHM
|
||||
{ ShmExtensionInit, SHMNAME, &noMITShmExtension, NULL, NULL },
|
||||
#endif
|
||||
|
|
19
os/WaitFor.c
19
os/WaitFor.c
|
@ -118,13 +118,6 @@ mffs(fd_mask mask)
|
|||
#include <X11/extensions/dpms.h>
|
||||
#endif
|
||||
|
||||
#ifdef XTESTEXT1
|
||||
/*
|
||||
* defined in xtestext1dd.c
|
||||
*/
|
||||
extern int playback_on;
|
||||
#endif /* XTESTEXT1 */
|
||||
|
||||
struct _OsTimerRec {
|
||||
OsTimerPtr next;
|
||||
CARD32 expires;
|
||||
|
@ -224,13 +217,6 @@ WaitForSomething(int *pClientsReady)
|
|||
BlockHandler((pointer)&wt, (pointer)&LastSelectMask);
|
||||
if (NewOutputPending)
|
||||
FlushAllOutput();
|
||||
#ifdef XTESTEXT1
|
||||
/* XXX how does this interact with new write block handling? */
|
||||
if (playback_on) {
|
||||
wt = &waittime;
|
||||
XTestComputeWaitTime (&waittime);
|
||||
}
|
||||
#endif /* XTESTEXT1 */
|
||||
/* keep this check close to select() call to minimize race */
|
||||
if (dispatchException)
|
||||
i = -1;
|
||||
|
@ -245,11 +231,6 @@ WaitForSomething(int *pClientsReady)
|
|||
}
|
||||
selecterr = GetErrno();
|
||||
WakeupHandler(i, (pointer)&LastSelectMask);
|
||||
#ifdef XTESTEXT1
|
||||
if (playback_on) {
|
||||
i = XTestProcessInputAction (i, &waittime);
|
||||
}
|
||||
#endif /* XTESTEXT1 */
|
||||
#ifdef SMART_SCHEDULE
|
||||
if (i >= 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue