From f4036f6ace5f770f0fe6a6e3dc3749051a81325a Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 22 Oct 2008 22:40:44 +1030 Subject: [PATCH] Remove XEvIE It's unmaintained and has been broken for quite a while; MPX finally smashed it completely. Signed-off-by: Peter Hutterer --- Xext/Makefile.am | 9 - Xext/xevie.c | 739 ------------------------------------- configure.ac | 7 - dix/events.c | 120 +----- dix/protocol.txt | 5 - hw/xfree86/loader/dixsym.c | 7 - include/cursorstr.h | 3 - include/dix-config.h.in | 3 - include/globals.h | 4 - include/windowstr.h | 4 - mi/miinitext.c | 15 - os/utils.c | 5 - 12 files changed, 2 insertions(+), 919 deletions(-) delete mode 100644 Xext/xevie.c diff --git a/Xext/Makefile.am b/Xext/Makefile.am index fc4376ee1..2f5c98b90 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -90,14 +90,6 @@ BUILTIN_SRCS += $(XCALIBRATE_SRCS) # XCalibrate needs tslib endif -# X EVent Interception Extension: allows accessibility helpers & composite -# managers to intercept events from input devices and transform as needed -# before the clients see them. -XEVIE_SRCS = xevie.c -if XEVIE -BUILTIN_SRCS += $(XEVIE_SRCS) -endif - # Multi-buffering extension MULTIBUFFER_SRCS = mbuf.c EXTRA_MULTIBUFFER_SRCS = mbufbf.c mbufpx.c @@ -136,7 +128,6 @@ EXTRA_DIST = \ $(XCSECURITY_SRCS) \ $(XCALIBRATE_SRCS) \ $(XINERAMA_SRCS) \ - $(XEVIE_SRCS) \ $(MULTIBUFFER_SRCS) \ $(EXTRA_MULTIBUFFER_SRCS) \ $(FONTCACHE_SRCS) \ diff --git a/Xext/xevie.c b/Xext/xevie.c deleted file mode 100644 index dfec68fe6..000000000 --- a/Xext/xevie.c +++ /dev/null @@ -1,739 +0,0 @@ -/************************************************************ - -Copyright 2003-2005 Sun Microsystems, Inc. - -All rights reserved. - -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, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -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 -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -************************************************************/ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "colormapst.h" -#include "scrnintstr.h" -#include "servermd.h" -#define _XEVIE_SERVER_ -#include -#include -#include "input.h" -#include "inputstr.h" -#include "windowstr.h" -#include "cursorstr.h" -#include - -#include "../os/osdep.h" -#include "modinit.h" - -#define NoSuchEvent 0x80000000 - -#ifdef XKB -extern Bool noXkbExtension; -#endif -extern int xeviegrabState; - -static DISPATCH_PROC(ProcXevieDispatch); -static DISPATCH_PROC(SProcXevieDispatch); - -static unsigned char XevieReqCode = 0; -static int XevieErrorBase; - -int xevieFlag = 0; -int xevieClientIndex = 0; -DeviceIntPtr xeviekb = NULL; -DeviceIntPtr xeviemouse = NULL; -Mask xevieMask = 0; -int xevieEventSent = 0; -int xevieKBEventSent = 0; -static Bool xevieModifiersOn = FALSE; - -static int xevieDevicePrivateKeyIndex; -static DevPrivateKey xevieDevicePrivateKey = &xevieDevicePrivateKeyIndex; - -#define XEVIEINFO(dev) ((xevieDeviceInfoPtr) \ - dixLookupPrivate(&(dev)->devPrivates, xevieDevicePrivateKey)) - -Mask xevieFilters[128] = -{ - NoSuchEvent, /* 0 */ - NoSuchEvent, /* 1 */ - KeyPressMask, /* KeyPress */ - KeyReleaseMask, /* KeyRelease */ - ButtonPressMask, /* ButtonPress */ - ButtonReleaseMask, /* ButtonRelease */ - PointerMotionMask /* MotionNotify (initial state) */ -}; - -typedef struct { - ProcessInputProc processInputProc; - ProcessInputProc realInputProc; - DeviceUnwrapProc unwrapProc; -} xevieDeviceInfoRec, *xevieDeviceInfoPtr; - -typedef struct { - CARD32 time; - KeyClassPtr keyc; -} xevieKeycQueueRec, *xevieKeycQueuePtr; - -#define KEYC_QUEUE_SIZE 100 -static xevieKeycQueueRec keycq[KEYC_QUEUE_SIZE] = {{0, NULL}}; -static int keycqHead = 0, keycqTail = 0; - -static Bool XevieStart(void); -static void XevieEnd(int clientIndex); -static void XevieClientStateCallback(CallbackListPtr *pcbl, pointer nulldata, - pointer calldata); -static void XevieServerGrabStateCallback(CallbackListPtr *pcbl, - pointer nulldata, - pointer calldata); - -static Bool XevieAdd(DeviceIntPtr device, pointer data); -static void XevieWrap(DeviceIntPtr device, ProcessInputProc proc); -static Bool XevieRemove(DeviceIntPtr device, pointer data); -static void doSendEvent(xEvent *xE, DeviceIntPtr device); -static void XeviePointerProcessInputProc(xEvent *xE, DeviceIntPtr dev, - int count); -static void XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count); - -void -XevieExtensionInit (void) -{ - ExtensionEntry* extEntry; - - if (!AddCallback(&ServerGrabCallback,XevieServerGrabStateCallback,NULL)) - return; - - if ((extEntry = AddExtension (XEVIENAME, - 0, - XevieNumberErrors, - ProcXevieDispatch, - SProcXevieDispatch, - NULL, - StandardMinorOpcode))) { - XevieReqCode = (unsigned char)extEntry->base; - XevieErrorBase = extEntry->errorBase; - } -} - -static -int ProcXevieQueryVersion (ClientPtr client) -{ - xXevieQueryVersionReply rep; - int n; - - REQUEST_SIZE_MATCH (xXevieQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequence_number = client->sequence; - rep.server_major_version = XEVIE_MAJOR_VERSION; - rep.server_minor_version = XEVIE_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequence_number, n); - swapl(&rep.length, n); - swaps(&rep.server_major_version, n); - swaps(&rep.server_minor_version, n); - } - WriteToClient (client, sizeof (xXevieQueryVersionReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcXevieStart (ClientPtr client) -{ - xXevieStartReply rep; - int n; - - REQUEST_SIZE_MATCH (xXevieStartReq); - rep.pad1 = 0; - - if(!xevieFlag){ - if (AddCallback(&ClientStateCallback,XevieClientStateCallback,NULL)) { - xevieFlag = 1; - rep.pad1 = 1; - xevieClientIndex = client->index; - if(!keycq[0].time ) { - int i; - for(i=0; ixkbInfo = xalloc(sizeof(XkbSrvInfoRec)); - } - } - } else - return BadAlloc; - } else - return BadAccess; -#ifdef XKB - if (!noXkbExtension) { - if (!XevieStart()) { - DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL); - return BadAlloc; - } - } -#endif - - xevieModifiersOn = FALSE; - - rep.length = 0; - rep.type = X_Reply; - rep.sequence_number = client->sequence; - if (client->swapped) { - swaps(&rep.sequence_number, n); - swapl(&rep.length, n); - } - WriteToClient (client, sizeof (xXevieStartReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcXevieEnd (ClientPtr client) -{ - xXevieEndReply rep; - int n; - - REQUEST_SIZE_MATCH (xXevieEndReq); - - if (xevieFlag) { - if (client->index != xevieClientIndex) - return BadAccess; - - DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL); - XevieEnd(xevieClientIndex); - } - - rep.length = 0; - rep.type = X_Reply; - rep.sequence_number = client->sequence; - if (client->swapped) { - swaps(&rep.sequence_number, n); - swapl(&rep.length, n); - } - WriteToClient (client, sizeof (xXevieEndReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcXevieSend (ClientPtr client) -{ - REQUEST (xXevieSendReq); - xXevieSendReply rep; - xEvent *xE; - static unsigned char lastDetail = 0, lastType = 0; - int n; - - REQUEST_SIZE_MATCH (xXevieSendReq); - - if (client->index != xevieClientIndex) - return BadAccess; - - xE = (xEvent *)&stuff->event; - rep.length = 0; - rep.type = X_Reply; - rep.sequence_number = client->sequence; - if (client->swapped) { - swaps(&rep.sequence_number, n); - swapl(&rep.length, n); - } - WriteToClient (client, sizeof (xXevieSendReply), (char *)&rep); - - switch(xE->u.u.type) { - case KeyPress: - case KeyRelease: - xevieKBEventSent = 1; -#ifdef XKB - if(!noXkbExtension) - doSendEvent(xE, inputInfo.keyboard); - else -#endif - CoreProcessKeyboardEvent (xE, xeviekb, 1); - break; - case ButtonPress: - case ButtonRelease: - case MotionNotify: - xevieEventSent = 1; -#ifdef XKB - if(!noXkbExtension) - doSendEvent(xE, inputInfo.pointer); - else -#endif - CoreProcessPointerEvent(xE, xeviemouse, 1); - break; - default: - break; - } - lastType = xE->u.u.type; - lastDetail = xE->u.u.detail; - return client->noClientException; -} - -static -int ProcXevieSelectInput (ClientPtr client) -{ - REQUEST (xXevieSelectInputReq); - xXevieSelectInputReply rep; - int n; - - REQUEST_SIZE_MATCH (xXevieSelectInputReq); - - if (client->index != xevieClientIndex) - return BadAccess; - - xevieMask = stuff->event_mask; - rep.length = 0; - rep.type = X_Reply; - rep.sequence_number = client->sequence; - if (client->swapped) { - swaps(&rep.sequence_number, n); - swapl(&rep.length, n); - } - WriteToClient (client, sizeof (xXevieSelectInputReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcXevieDispatch (ClientPtr client) -{ - REQUEST (xReq); - switch (stuff->data) - { - case X_XevieQueryVersion: - return ProcXevieQueryVersion (client); - case X_XevieStart: - return ProcXevieStart (client); - case X_XevieEnd: - return ProcXevieEnd (client); - case X_XevieSend: - return ProcXevieSend (client); - case X_XevieSelectInput: - return ProcXevieSelectInput(client); - default: - return BadRequest; - } -} - -static -int SProcXevieQueryVersion (ClientPtr client) -{ - int n; - - REQUEST(xXevieQueryVersionReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXevieQueryVersionReq); - swaps (&stuff->client_major_version, n); - swaps (&stuff->client_minor_version, n); - return ProcXevieQueryVersion(client); -} - -static -int SProcXevieStart (ClientPtr client) -{ - int n; - - REQUEST (xXevieStartReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXevieStartReq); - swapl (&stuff->screen, n); - return ProcXevieStart (client); -} - -static -int SProcXevieEnd (ClientPtr client) -{ - int n; - - REQUEST (xXevieEndReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXevieEndReq); - swapl (&stuff->cmap, n); - return ProcXevieEnd (client); -} - -static -int SProcXevieSend (ClientPtr client) -{ - int n; - xEvent eventT; - EventSwapPtr proc; - - REQUEST (xXevieSendReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXevieSendReq); - swapl (&stuff->dataType, n); - - /* Swap event */ - proc = EventSwapVector[stuff->event.u.u.type & 0177]; - if (!proc || proc == NotImplemented) /* no swapping proc; invalid event type? */ - return (BadValue); - (*proc)(&stuff->event, &eventT); - stuff->event = eventT; - - return ProcXevieSend (client); -} - -static -int SProcXevieSelectInput (ClientPtr client) -{ - int n; - - REQUEST (xXevieSelectInputReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXevieSelectInputReq); - swapl (&stuff->event_mask, n); - return ProcXevieSelectInput (client); -} - - -static -int SProcXevieDispatch (ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XevieQueryVersion: - return SProcXevieQueryVersion (client); - case X_XevieStart: - return SProcXevieStart (client); - case X_XevieEnd: - return SProcXevieEnd (client); - case X_XevieSend: - return SProcXevieSend (client); - case X_XevieSelectInput: - return SProcXevieSelectInput(client); - default: - return BadRequest; - } -} -/*======================================================*/ - -#define WRAP_INPUTPROC(dev,store,inputProc) \ - store->processInputProc = dev->public.processInputProc; \ - dev->public.processInputProc = inputProc; \ - store->realInputProc = dev->public.realInputProc; \ - dev->public.realInputProc = inputProc; - -#define COND_WRAP_INPUTPROC(dev,store,inputProc) \ - if (dev->public.processInputProc == dev->public.realInputProc) \ - dev->public.processInputProc = inputProc; \ - store->processInputProc = \ - store->realInputProc = dev->public.realInputProc; \ - dev->public.realInputProc = inputProc; - -#define UNWRAP_INPUTPROC(dev,restore) \ - dev->public.processInputProc = restore->processInputProc; \ - dev->public.realInputProc = restore->realInputProc; - -#define UNWRAP_INPUTPROC(dev,restore) \ - dev->public.processInputProc = restore->processInputProc; \ - dev->public.realInputProc = restore->realInputProc; - -#define XEVIE_EVENT(xE) \ - (xevieFlag \ - && !xeviegrabState \ - && clients[xevieClientIndex] \ - && (xevieMask & xevieFilters[xE->u.u.type])) - - -static void -sendEvent(ClientPtr pClient, xEvent *xE) -{ - if(pClient->swapped) { - xEvent eventTo; - - /* Remember to strip off the leading bit of type in case - this event was sent with "SendEvent." */ - (*EventSwapVector[xE->u.u.type & 0177]) (xE, &eventTo); - (void)WriteToClient(pClient, sizeof(xEvent), (char *)&eventTo); - } else { - (void)WriteToClient(pClient, sizeof(xEvent), (char *) xE); - } -} - -static void -XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count) -{ - int key, bit; - BYTE *kptr; - ProcessInputProc tmp; - KeyClassPtr keyc = dev->key; - xevieDeviceInfoPtr xeviep = XEVIEINFO(dev); - - if(XEVIE_EVENT(xE)) { - key = xE->u.u.detail; - kptr = &keyc->down[key >> 3]; - bit = 1 << (key & 7); - - if (dev->key->modifierMap[xE->u.u.detail]) - xevieModifiersOn = TRUE; - - xE->u.keyButtonPointer.event = xeviewin->drawable.id; - xE->u.keyButtonPointer.root = GetCurrentRootWindow(dev)->drawable.id; - xE->u.keyButtonPointer.child = (xeviewin->firstChild) - ? xeviewin->firstChild->drawable.id:0; - xE->u.keyButtonPointer.rootX = xeviehot.x; - xE->u.keyButtonPointer.rootY = xeviehot.y; - xE->u.keyButtonPointer.state = keyc->state | inputInfo.pointer->button->state; - /* fix bug: sequence lost in Xlib */ - xE->u.u.sequenceNumber = clients[xevieClientIndex]->sequence; -#ifdef XKB - /* fix for bug5092586 */ - if(!noXkbExtension) { - switch(xE->u.u.type) { - case KeyPress: *kptr |= bit; break; - case KeyRelease: *kptr &= ~bit; break; - } - } -#endif - keycq[keycqHead].time = xE->u.keyButtonPointer.time; - memcpy(keycq[keycqHead].keyc, keyc, sizeof(KeyClassRec) - sizeof(KeyClassPtr)); - memcpy(keycq[keycqHead].keyc->xkbInfo, keyc->xkbInfo, sizeof(XkbSrvInfoRec)); - if(++keycqHead >=KEYC_QUEUE_SIZE) - keycqHead = 0; - sendEvent(clients[xevieClientIndex], xE); - return; - } - - tmp = dev->public.realInputProc; - UNWRAP_INPUTPROC(dev,xeviep); - dev->public.processInputProc(xE,dev,count); - COND_WRAP_INPUTPROC(dev,xeviep,tmp); -} - -static void -XeviePointerProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(dev); - ProcessInputProc tmp; - - if (XEVIE_EVENT(xE)) { - /* fix bug: sequence lost in Xlib */ - xE->u.u.sequenceNumber = clients[xevieClientIndex]->sequence; - sendEvent(clients[xevieClientIndex], xE); - return; - } - - tmp = dev->public.realInputProc; - UNWRAP_INPUTPROC(dev,xeviep); - dev->public.processInputProc(xE,dev,count); - COND_WRAP_INPUTPROC(dev,xeviep,tmp); -} - -static Bool -XevieStart(void) -{ - ProcessInputProc prp; - prp = XevieKbdProcessInputProc; - if (!XevieAdd(inputInfo.keyboard,&prp)) - return FALSE; - prp = XeviePointerProcessInputProc; - if (!XevieAdd(inputInfo.pointer,&prp)) - return FALSE; - - return TRUE; -} - - -static void -XevieEnd(int clientIndex) -{ - if (!clientIndex || clientIndex == xevieClientIndex) { - -#ifdef XKB - if(!noXkbExtension) { - - XevieRemove(inputInfo.keyboard,NULL); - - inputInfo.keyboard->public.processInputProc = CoreProcessKeyboardEvent; - inputInfo.keyboard->public.realInputProc = CoreProcessKeyboardEvent; - XkbSetExtension(inputInfo.keyboard,ProcessKeyboardEvent); - - - XevieRemove(inputInfo.pointer,NULL); - - inputInfo.pointer->public.processInputProc = CoreProcessPointerEvent; - inputInfo.pointer->public.realInputProc = CoreProcessPointerEvent; - XkbSetExtension(inputInfo.pointer,ProcessPointerEvent); - } -#endif - - xevieFlag = 0; - xevieClientIndex = 0; - DeleteCallback (&ClientStateCallback, XevieClientStateCallback, NULL); - } -} - -static void -XevieClientStateCallback(CallbackListPtr *pcbl, pointer nulldata, - pointer calldata) -{ - NewClientInfoRec *pci = (NewClientInfoRec *)calldata; - ClientPtr client = pci->client; - if (client->clientState == ClientStateGone - || client->clientState == ClientStateRetained) - XevieEnd(client->index); -} - -static void -XevieServerGrabStateCallback(CallbackListPtr *pcbl, pointer nulldata, - pointer calldata) -{ - ServerGrabInfoRec *grbinfo = (ServerGrabInfoRec *)calldata; - if (grbinfo->grabstate == SERVER_GRABBED) - xeviegrabState = TRUE; - else - xeviegrabState = FALSE; -} - -#define UNWRAP_UNWRAPPROC(device,proc_store) \ - device->unwrapProc = proc_store; - -#define WRAP_UNWRAPPROC(device,proc_store,proc) \ - proc_store = device->unwrapProc; \ - device->unwrapProc = proc; - -static void -xevieUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc, pointer data) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(device); - ProcessInputProc tmp = device->public.processInputProc; - - UNWRAP_INPUTPROC(device,xeviep); - UNWRAP_UNWRAPPROC(device,xeviep->unwrapProc); - proc(device,data); - WRAP_INPUTPROC(device,xeviep,tmp); - WRAP_UNWRAPPROC(device,xeviep->unwrapProc,xevieUnwrapProc); -} - -static Bool -XevieUnwrapAdd(DeviceIntPtr device, void* data) -{ - if (device->unwrapProc) - device->unwrapProc(device,XevieUnwrapAdd,data); - else { - ProcessInputProc *ptr = data; - XevieWrap(device,*ptr); - } - - return TRUE; -} - -static Bool -XevieAdd(DeviceIntPtr device, void* data) -{ - xevieDeviceInfoPtr xeviep; - - xeviep = xalloc (sizeof (xevieDeviceInfoRec)); - if (!xeviep) - return FALSE; - - dixSetPrivate(&device->devPrivates, xevieDevicePrivateKey, xeviep); - XevieUnwrapAdd(device, data); - - return TRUE; -} - -static Bool -XevieRemove(DeviceIntPtr device,pointer data) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(device); - - if (!xeviep) return TRUE; - - UNWRAP_INPUTPROC(device,xeviep); - UNWRAP_UNWRAPPROC(device,xeviep->unwrapProc); - - xfree(xeviep); - dixSetPrivate(&device->devPrivates, xevieDevicePrivateKey, NULL); - return TRUE; -} - -static void -XevieWrap(DeviceIntPtr device, ProcessInputProc proc) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(device); - - WRAP_INPUTPROC(device,xeviep,proc); - WRAP_UNWRAPPROC(device,xeviep->unwrapProc,xevieUnwrapProc); -} - -static void -doSendEvent(xEvent *xE, DeviceIntPtr dev) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(dev); - ProcessInputProc tmp = dev->public.realInputProc; - if (((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease)) - && !xevieModifiersOn) { - KeyClassPtr keyc = dev->key; - CARD8 realModes = dev->key->modifierMap[xE->u.u.detail]; - int notFound = 0; - /* if some events are consumed by client, move the queue tail pointer to the current - event which just comes back from Xevie client . - */ - if(keycq[keycqTail].time != xE->u.keyButtonPointer.time) { - while(keycq[keycqTail].time != xE->u.keyButtonPointer.time) { - if(++keycqTail >= KEYC_QUEUE_SIZE) - keycqTail = 0; - if(keycqTail == keycqHead) { - notFound = 1; - break; - } - } - } - if(!notFound) { - dev->key = keycq[keycqTail].keyc; - if(++keycqTail >= KEYC_QUEUE_SIZE) - keycqTail = 0; - } - dev->key->modifierMap[xE->u.u.detail] = 0; - - if(dev->key->xkbInfo->repeatKey != 0 && xE->u.u.type != KeyPress) - XkbLastRepeatEvent= (pointer)xE; - UNWRAP_INPUTPROC(dev,xeviep); - dev->public.processInputProc(xE,dev,1); - COND_WRAP_INPUTPROC(dev,xeviep,tmp); - XkbLastRepeatEvent= NULL; - - dev->key->modifierMap[xE->u.u.detail] = realModes; - dev->key = keyc; - if(notFound) { - DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL); - XevieEnd(xevieClientIndex); - ErrorF("Error: Xevie keyc queue size is not enough, disable Xevie\n"); - } - } else { - UNWRAP_INPUTPROC(dev,xeviep); - dev->public.processInputProc(xE,dev,1); - COND_WRAP_INPUTPROC(dev,xeviep,tmp); - } -} - diff --git a/configure.ac b/configure.ac index 869e8e8da..138208dbd 100644 --- a/configure.ac +++ b/configure.ac @@ -532,7 +532,6 @@ AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--disable-xselinux], [Build SELinu AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: disabled)]), [XCSECURITY=$enableval], [XCSECURITY=no]) AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no]) AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no]) -AC_ARG_ENABLE(xevie, AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes]) AC_ARG_ENABLE(multibuffer, AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no]) AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes]) AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: disabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=no]) @@ -901,12 +900,6 @@ if test "x$XCSECURITY" = xyes; then AC_DEFINE(XCSECURITY, 1, [Build Security extension]) fi -AM_CONDITIONAL(XEVIE, [test "x$XEVIE" = xyes]) -if test "x$XEVIE" = xyes; then - AC_DEFINE(XEVIE, 1, [Build XEvIE extension]) - REQUIRED_MODULES="$REQUIRED_MODULES evieproto" -fi - AM_CONDITIONAL(MULTIBUFFER, [test "x$MULTIBUFFER" = xyes]) if test "x$MULTIBUFFER" = xyes; then AC_DEFINE(MULTIBUFFER, 1, [Build Multibuffer extension]) diff --git a/dix/events.c b/dix/events.c index 6833a6bca..35c1bface 100644 --- a/dix/events.c +++ b/dix/events.c @@ -149,18 +149,6 @@ typedef const char *string; #include "Xserver-dtrace.h" #endif -#ifdef XEVIE -extern int xevieFlag; -extern int xevieClientIndex; -extern DeviceIntPtr xeviemouse; -extern DeviceIntPtr xeviekb; -extern Mask xevieMask; -extern Mask xevieFilters[128]; -extern int xevieEventSent; -extern int xevieKBEventSent; -int xeviegrabState = 0; -#endif - #include #include #include "exglobals.h" @@ -338,11 +326,6 @@ IsKeyboardDevice(DeviceIntPtr dev) return (dev->key && dev->kbdfeed) && !IsPointerDevice(dev);; } -#ifdef XEVIE -_X_EXPORT WindowPtr xeviewin; -_X_EXPORT HotSpot xeviehot; -#endif - static void DoEnterLeaveEvents( DeviceIntPtr pDev, WindowPtr fromWin, @@ -634,10 +617,6 @@ XineramaCheckVirtualMotion( qe->event->u.keyButtonPointer.rootY = pSprite->hot.y; } } -#ifdef XEVIE - xeviehot.x = pSprite->hot.x; - xeviehot.y = pSprite->hot.y; -#endif } @@ -683,11 +662,6 @@ XineramaCheckMotion(xEvent *xE, DeviceIntPtr pDev) XE_KBPTR.rootY = pSprite->hot.y; } -#ifdef XEVIE - xeviehot.x = pSprite->hot.x; - xeviehot.y = pSprite->hot.y; - xeviewin = -#endif pSprite->win = XYToWindow(pDev, pSprite->hot.x, pSprite->hot.y); if (pSprite->win != prevSpriteWin) @@ -945,10 +919,6 @@ CheckVirtualMotion( qe->event->u.keyButtonPointer.rootY = pSprite->hot.y; } } -#ifdef XEVIE - xeviehot.x = pSprite->hot.x; - xeviehot.y = pSprite->hot.y; -#endif RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum]; } @@ -2711,10 +2681,6 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) pSprite->hot.y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y); -#ifdef XEVIE - xeviehot.x = pSprite->hot.x; - xeviehot.y = pSprite->hot.y; -#endif pSprite->hotPhys = pSprite->hot; if ((pSprite->hotPhys.x != *rootX) || @@ -2729,9 +2695,6 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev) *rootY = pSprite->hot.y; } -#ifdef XEVIE - xeviewin = -#endif pSprite->win = XYToWindow(pDev, pSprite->hot.x, pSprite->hot.y); #ifdef notyet if (!(pSprite->win->deliverableEvents & @@ -2828,14 +2791,12 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) /** * Called from main() with the root window on the first screen. Used to do a * lot more when MPX wasn't around yet. Things change. + * + * Should delete this now? -ds */ void DefineInitialRootWindow(WindowPtr win) { -#ifdef XEVIE - xeviewin = win; -#endif - } /** @@ -2988,9 +2949,6 @@ UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen) pSprite->hot = pSprite->hotPhys; pSprite->hotLimits.x2 = pScreen->width; pSprite->hotLimits.y2 = pScreen->height; -#ifdef XEVIE - xeviewin = -#endif pSprite->win = win; pSprite->current = wCursor (win); pSprite->current->refcnt++; @@ -3813,45 +3771,6 @@ ProcessKeyboardEvent (xEvent *xE, DeviceIntPtr keybd, int count) GrabInfoPtr grabinfo; Bool deactivateGrab = FALSE; KeyClassPtr keyc = keybd->key; -#ifdef XEVIE - static Window rootWin = 0; - - if(!xeviegrabState && xevieFlag && clients[xevieClientIndex] && - (xevieMask & xevieFilters[xE->u.u.type])) { - key = xE->u.u.detail; - kptr = &keyc->down[key >> 3]; - bit = 1 << (key & 7); - if((xE->u.u.type == KeyPress && (*kptr & bit)) || - (xE->u.u.type == KeyRelease && !(*kptr & bit))) - {} else { -#ifdef XKB - if(!noXkbExtension) - xevieKBEventSent = 1; -#endif - if(!xevieKBEventSent) - { - xeviekb = keybd; - if(!rootWin) { - rootWin = GetCurrentRootWindow(keybd)->drawable.id; - } - xE->u.keyButtonPointer.event = xeviewin->drawable.id; - xE->u.keyButtonPointer.root = rootWin; - xE->u.keyButtonPointer.child = (xeviewin->firstChild) ? xeviewin->firstChild-> -drawable.id:0; - xE->u.keyButtonPointer.rootX = xeviehot.x; - xE->u.keyButtonPointer.rootY = xeviehot.y; - xE->u.keyButtonPointer.state = keyc->state; - WriteToClient(clients[xevieClientIndex], sizeof(xEvent), (char *)xE); -#ifdef XKB - if(noXkbExtension) -#endif - return; - } else { - xevieKBEventSent = 0; - } - } - } -#endif if (xE->u.u.type & EXTENSION_EVENT_BASE) grabinfo = &keybd->deviceGrab; @@ -3871,15 +3790,6 @@ drawable.id:0; CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); } } -#ifdef XEVIE - /* fix for bug5094030: don't change the state bit if the event is from XEvIE client */ - if(!(!xeviegrabState && xevieFlag && clients[xevieClientIndex] && - (xevieMask & xevieFilters[xE->u.u.type] -#ifdef XKB - && !noXkbExtension -#endif - ))) -#endif /* ProcessOtherEvent already updated the keyboard's state, so we need to * access prev_state here! */ XE_KBPTR.state = (keyc->prev_state | GetPairedDevice(keybd)->button->state); @@ -3889,16 +3799,6 @@ drawable.id:0; kptr = &keyc->down[key >> 3]; bit = 1 << (key & 7); modifiers = keyc->modifierMap[key]; -#if defined(XKB) && defined(XEVIE) - if(!noXkbExtension && !xeviegrabState && - xevieFlag && clients[xevieClientIndex] && - (xevieMask & xevieFilters[xE->u.u.type])) { - switch(xE->u.u.type) { - case KeyPress: *kptr &= ~bit; break; - case KeyRelease: *kptr |= bit; break; - } - } -#endif switch (xE->u.u.type) { @@ -3996,18 +3896,6 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) #ifdef XKB XkbSrvInfoPtr xkbi= GetPairedDevice(mouse)->key->xkbInfo; #endif -#ifdef XEVIE - if(xevieFlag && clients[xevieClientIndex] && !xeviegrabState && - (xevieMask & xevieFilters[xE->u.u.type])) { - if(xevieEventSent) - xevieEventSent = 0; - else { - xeviemouse = mouse; - WriteToClient(clients[xevieClientIndex], sizeof(xEvent), (char *)xE); - return; - } - } -#endif if (!syncEvents.playingEvents) NoticeTime(xE) @@ -5454,10 +5342,6 @@ InitEvents(void) memcpy(&filters[i], filters[0], sizeof(filters[0])); } -#ifdef XEVIE - xeviewin = NULL; -#endif - syncEvents.replayDev = (DeviceIntPtr)NULL; syncEvents.replayWin = NullWindow; while (syncEvents.pending) diff --git a/dix/protocol.txt b/dix/protocol.txt index 0a85ca872..c085fde24 100644 --- a/dix/protocol.txt +++ b/dix/protocol.txt @@ -731,11 +731,6 @@ E000 XC-APPGROUP:BadAppGroup R000 XC-MISC:GetVersion R001 XC-MISC:GetXIDRange R002 XC-MISC:GetXIDList -R000 XEVIE:QueryVersion -R001 XEVIE:Start -R002 XEVIE:End -R003 XEVIE:Send -R004 XEVIE:SelectInput R000 XFIXES:QueryVersion R001 XFIXES:ChangeSaveSet R002 XFIXES:SelectSelectionInput diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 190626eaa..19b93c5f0 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -193,10 +193,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(CheckExtension) SYMFUNC(MinorOpcodeOfRequest) SYMFUNC(StandardMinorOpcode) -#ifdef XEVIE - SYMVAR(xeviehot) - SYMVAR(xeviewin) -#endif /* gc.c */ SYMFUNC(CopyGC) SYMFUNC(CreateGC) @@ -358,9 +354,6 @@ _X_HIDDEN void *dixLookupTab[] = { #ifdef RES SYMVAR(noResExtension) #endif -#ifdef XEVIE - SYMVAR(noXevieExtension) -#endif #ifdef XF86BIGFONT SYMVAR(noXFree86BigfontExtension) #endif diff --git a/include/cursorstr.h b/include/cursorstr.h index bca35969b..3ff56e2bf 100644 --- a/include/cursorstr.h +++ b/include/cursorstr.h @@ -92,7 +92,4 @@ typedef struct { ScreenPtr pScreen; } HotSpot; -#ifdef XEVIE -extern HotSpot xeviehot; -#endif #endif /* CURSORSTRUCT_H */ diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 954a4284c..cfaea3046 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -303,9 +303,6 @@ /* Support Xdmcp */ #undef XDMCP -/* Build XEvIE extension */ -#undef XEVIE - /* Build XFree86 BigFont extension */ #undef XF86BIGFONT diff --git a/include/globals.h b/include/globals.h index 68ea2cbe2..c3d2dcfa2 100644 --- a/include/globals.h +++ b/include/globals.h @@ -94,10 +94,6 @@ extern Bool noSecurityExtension; extern Bool noResExtension; #endif -#ifdef XEVIE -extern Bool noXevieExtension; -#endif - #ifdef XF86BIGFONT extern Bool noXFree86BigfontExtension; #endif diff --git a/include/windowstr.h b/include/windowstr.h index 9bdcadd1e..3beb01c80 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -257,8 +257,4 @@ typedef struct _FocusSemaphores { char focusinout[(MAXDEVICES + 7)/8]; } FocusSemaphoresRec, *FocusSemaphoresPtr; -#ifdef XEVIE -extern WindowPtr xeviewin; -#endif - #endif /* WINDOWSTRUCT_H */ diff --git a/mi/miinitext.c b/mi/miinitext.c index bfcb10d40..753abc13a 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -119,9 +119,6 @@ extern Bool noSecurityExtension; #ifdef RES extern Bool noResExtension; #endif -#ifdef XEVIE -extern Bool noXevieExtension; -#endif #ifdef XF86BIGFONT extern Bool noXFree86BigfontExtension; #endif @@ -265,9 +262,6 @@ extern void ResExtensionInit(INITARGS); #ifdef DMXEXT extern void DMXExtensionInit(INITARGS); #endif -#ifdef XEVIE -extern void XevieExtensionInit(INITARGS); -#endif #ifdef XFIXES extern void XFixesExtensionInit(INITARGS); #endif @@ -327,9 +321,6 @@ static ExtensionToggle ExtensionToggleList[] = #ifdef RES { "X-Resource", &noResExtension }, #endif -#ifdef XEVIE - { "XEVIE", &noXevieExtension }, -#endif #ifdef XF86BIGFONT { "XFree86-Bigfont", &noXFree86BigfontExtension }, #endif @@ -474,9 +465,6 @@ InitExtensions(int argc, char *argv[]) #ifdef DMXEXT DMXExtensionInit(); /* server-specific extension, cannot be disabled */ #endif -#ifdef XEVIE - if (!noXevieExtension) XevieExtensionInit(); -#endif #ifdef COMPOSITE if (!noCompositeExtension) CompositeExtensionInit(); #endif @@ -533,9 +521,6 @@ static ExtensionModule staticExtensions[] = { #ifdef DAMAGE { DamageExtensionInit, "DAMAGE", &noDamageExtension, NULL }, #endif -#ifdef XEVIE - { XevieExtensionInit, "XEVIE", &noXevieExtension, NULL }, -#endif { NULL, NULL, NULL, NULL, NULL } }; diff --git a/os/utils.c b/os/utils.c index b936d4c69..f0bb717b4 100644 --- a/os/utils.c +++ b/os/utils.c @@ -160,11 +160,6 @@ _X_EXPORT Bool noSecurityExtension = FALSE; #ifdef RES _X_EXPORT Bool noResExtension = FALSE; #endif -#ifdef XEVIE -/* Xevie is disabled by default for now until the - * interface is stable */ -_X_EXPORT Bool noXevieExtension = TRUE; -#endif #ifdef XF86BIGFONT _X_EXPORT Bool noXFree86BigfontExtension = FALSE; #endif