Xi: purge ExtendedGrabDevice request handling.

This commit is contained in:
Peter Hutterer 2009-02-20 15:01:05 +10:00
parent 43e48900fc
commit 66dd8879b3
4 changed files with 2 additions and 152 deletions

View File

@ -27,8 +27,6 @@ libXi_la_SOURCES = \
devbell.h \ devbell.h \
exevents.c \ exevents.c \
exglobals.h \ exglobals.h \
extgrbdev.c \
extgrbdev.h \
extinit.c \ extinit.c \
getbmap.c \ getbmap.c \
getbmap.h \ getbmap.h \

View File

@ -1,100 +0,0 @@
/*
* Copyright 2007-2008 Peter Hutterer
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
*
* Author: Peter Hutterer, University of South Australia, NICTA
*/
/***********************************************************************
*
* Request to fake data for a given device.
*
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <X11/X.h> /* for inputstr.h */
#include <X11/Xproto.h> /* Request macro */
#include "inputstr.h" /* DeviceIntPtr */
#include "windowstr.h" /* window structure */
#include "scrnintstr.h" /* screen structure */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include <X11/extensions/Xge.h>
#include "extnsionst.h"
#include "exevents.h"
#include "exglobals.h"
#include "grabdev.h" /* CreateMaskFromList */
#include "extgrbdev.h"
int
SProcXExtendedGrabDevice(ClientPtr client)
{
char n;
int i;
long* p;
REQUEST(xExtendedGrabDeviceReq);
swaps(&stuff->length, n);
REQUEST_AT_LEAST_SIZE(xExtendedGrabDeviceReq);
swapl(&stuff->grab_window, n);
swapl(&stuff->time, n);
swapl(&stuff->confine_to, n);
swapl(&stuff->cursor, n);
swaps(&stuff->event_count, n);
swaps(&stuff->generic_event_count, n);
p = (long *)&stuff[1];
for (i = 0; i < stuff->event_count; i++) {
swapl(p, n);
p++;
}
for (i = 0; i < stuff->generic_event_count; i++) {
p++; /* first 4 bytes are extension type and padding */
swapl(p, n);
p++;
}
return ProcXExtendedGrabDevice(client);
}
int
ProcXExtendedGrabDevice(ClientPtr client)
{
return BadRequest;
}
void
SRepXExtendedGrabDevice(ClientPtr client, int size,
xExtendedGrabDeviceReply* rep)
{
char n;
swaps(&rep->sequenceNumber, n);
swaps(&rep->length, n);
WriteToClient(client, size, (char*)rep);
}

View File

@ -1,43 +0,0 @@
/*
* Copyright 2007-2008 Peter Hutterer
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
*
* Author: Peter Hutterer, University of South Australia, NICTA
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef EXTGRBDEV_H
#define EXTGRBDEV_H 1
int SProcXExtendedGrabDevice(ClientPtr /* client */
);
int ProcXExtendedGrabDevice(ClientPtr /* client */
);
void SRepXExtendedGrabDevice(ClientPtr client,
int size,
xExtendedGrabDeviceReply* rep);
#endif /* EXTGRBDEV_H */

View File

@ -82,7 +82,6 @@ SOFTWARE.
#include "chgprop.h" #include "chgprop.h"
#include "chgptr.h" #include "chgptr.h"
#include "closedev.h" #include "closedev.h"
#include "extgrbdev.h"
#include "devbell.h" #include "devbell.h"
#include "getbmap.h" #include "getbmap.h"
#include "getbmap.h" #include "getbmap.h"
@ -235,8 +234,7 @@ static int (*ProcIVector[])(ClientPtr) = {
ProcXChangeDeviceHierarchy, /* 43 */ ProcXChangeDeviceHierarchy, /* 43 */
ProcXSetClientPointer, /* 44 */ ProcXSetClientPointer, /* 44 */
ProcXGetClientPointer, /* 45 */ ProcXGetClientPointer, /* 45 */
ProcXiSelectEvent, /* 46 */ ProcXiSelectEvent /* 46 */
ProcXExtendedGrabDevice /* 47 */
}; };
/* For swapped clients */ /* For swapped clients */
@ -287,8 +285,7 @@ static int (*SProcIVector[])(ClientPtr) = {
SProcXChangeDeviceHierarchy, /* 43 */ SProcXChangeDeviceHierarchy, /* 43 */
SProcXSetClientPointer, /* 44 */ SProcXSetClientPointer, /* 44 */
SProcXGetClientPointer, /* 45 */ SProcXGetClientPointer, /* 45 */
SProcXiSelectEvent, /* 46 */ SProcXiSelectEvent /* 46 */
SProcXExtendedGrabDevice /* 47 */
}; };
/***************************************************************** /*****************************************************************
@ -479,8 +476,6 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep)
(xQueryDevicePointerReply *) rep); (xQueryDevicePointerReply *) rep);
else if (rep->RepType == X_GetClientPointer) else if (rep->RepType == X_GetClientPointer)
SRepXGetClientPointer(client, len, (xGetClientPointerReply*) rep); SRepXGetClientPointer(client, len, (xGetClientPointerReply*) rep);
else if (rep->RepType == X_ExtendedGrabDevice)
SRepXExtendedGrabDevice(client, len, (xExtendedGrabDeviceReply*) rep);
else { else {
FatalError("XINPUT confused sending swapped reply"); FatalError("XINPUT confused sending swapped reply");
} }