diff --git a/Xi/exevents.c b/Xi/exevents.c index e19e207fd..9689ef8f8 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -111,13 +111,6 @@ XIShouldNotify(ClientPtr client, DeviceIntPtr dev) return 0; } -void -RegisterOtherDevice(DeviceIntPtr device) -{ - device->public.processInputProc = ProcessOtherEvent; - device->public.realInputProc = ProcessOtherEvent; -} - Bool IsPointerEvent(InternalEvent* event) { diff --git a/Xi/stubs.c b/Xi/stubs.c index 296a8c4a5..de80042ec 100644 --- a/Xi/stubs.c +++ b/Xi/stubs.c @@ -122,7 +122,6 @@ AddOtherInputDevices(void) dev = (DeviceIntPtr) AddInputDevice(deviceProc, TRUE); dev->public.devicePrivate = private; - RegisterOtherDevice(dev); dev->inited = ((*dev->deviceProc)(dev, DEVICE_INIT) == Success); ************************************************************************/ diff --git a/dix/devices.c b/dix/devices.c index 2e65a041d..0f00f2409 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -261,8 +261,8 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) if (!dev) return (DeviceIntPtr)NULL; dev->id = devid; - dev->public.processInputProc = (ProcessInputProc)NoopDDA; - dev->public.realInputProc = (ProcessInputProc)NoopDDA; + dev->public.processInputProc = ProcessOtherEvent; + dev->public.realInputProc = ProcessOtherEvent; dev->public.enqueueInputProc = EnqueueEvent; dev->deviceProc = deviceProc; dev->startup = autoStart; @@ -272,6 +272,7 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; + dev->coreEvents = TRUE; /* sprite defaults */ @@ -1106,18 +1107,6 @@ NumMotionEvents(void) return inputInfo.pointer->valuator->numMotionEvents; } -void -RegisterPointerDevice(DeviceIntPtr device) -{ - RegisterOtherDevice(device); -} - -void -RegisterKeyboardDevice(DeviceIntPtr device) -{ - RegisterOtherDevice(device); -} - int dixLookupDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode) { diff --git a/doc/xml/Xserver-spec.xml b/doc/xml/Xserver-spec.xml index 563705fb9..ec7f1b77b 100644 --- a/doc/xml/Xserver-spec.xml +++ b/doc/xml/Xserver-spec.xml @@ -1710,8 +1710,6 @@ Input initialization is a bit complicated. It all starts with InitInput(), a routine that you write to call AddInputDevice() twice (once for pointing device and once for keyboard.) -You also want to call RegisterKeyboardDevice() and RegisterPointerDevice() -on them. When you Add the devices, a routine you supply for each device @@ -1731,8 +1729,6 @@ the pointer is the pointer. InitInput is a DDX routine you must write to initialize the input subsystem in DDX. It must call AddInputDevice() for each device that might generate events. -In addition, you must register the main keyboard and pointing devices by -calling RegisterPointerDevice() and RegisterKeyboardDevice().
@@ -1755,25 +1751,6 @@ Note also that except for the main keyboard and pointing device, an extension is needed to provide for a client interface to a device. -
- - void RegisterPointerDevice(device) - DevicePtr device; -
-RegisterPointerDevice is a DIX routine that your DDX code calls that -makes that device the main pointing device. -This routine is called once upon initialization and cannot be called again. -
- -
- - void RegisterKeyboardDevice(device) - DevicePtr device; -
-RegisterKeyboardDevice makes the given device the main keyboard. -This routine is called once upon initialization and cannot be called again. -
- The following DIX procedures return the specified DevicePtr. They may or may not be useful to DDX implementors. @@ -5163,8 +5140,6 @@ mi and fb implementations. -RegisterKeyboardDevicedix -RegisterPointerDevicedix RemoveEnabledDeviceos ResetCurrentRequestos SaveScreenddxScreen diff --git a/hw/dmx/doc/dmx.xml b/hw/dmx/doc/dmx.xml index c6dc0ccd4..8dbb7d86f 100644 --- a/hw/dmx/doc/dmx.xml +++ b/hw/dmx/doc/dmx.xml @@ -817,22 +817,10 @@ is called once for each input device. Once input handles for core keyboard and core pointer devices have -been obtained from AddInputDevice(), they are registered as core devices -by calling RegisterPointerDevice() and RegisterKeyboardDevice(). Each -of these should be called once. If both core devices are not +been obtained from AddInputDevice(). If both core devices are not registered, then the X server will exit with a fatal error when it attempts to start the input devices in InitAndStartDevices(), which is called directly after InitInput() (see below). - - - -Register{Pointer,Keyboard}Device() -These DIX functions take a -handle returned from AddInputDevice() and initialize the core input -device fields in inputInfo, and initialize the input processing and grab -functions for each core input device. - - The core pointer device is then registered with the miPointer code diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c index 83a2abbb8..829a28950 100644 --- a/hw/dmx/input/dmxinputinit.c +++ b/hw/dmx/input/dmxinputinit.c @@ -693,7 +693,6 @@ static DeviceIntPtr dmxAddDevice(DMXLocalInputInfoPtr dmxLocal) DeviceIntPtr pDevice; Atom atom; const char *name = NULL; - void (*registerProcPtr)(DeviceIntPtr) = NULL; char *devname; DMXInputInfo *dmxInput; @@ -706,22 +705,19 @@ static DeviceIntPtr dmxAddDevice(DMXLocalInputInfoPtr dmxLocal) dmxLocal->isCore = 1; dmxLocalCoreKeyboard = dmxLocal; name = "keyboard"; - registerProcPtr = RegisterKeyboardDevice; } if (dmxLocal->type == DMX_LOCAL_MOUSE && !dmxLocalCorePointer) { dmxLocal->isCore = 1; dmxLocalCorePointer = dmxLocal; name = "pointer"; - registerProcPtr = RegisterPointerDevice; } } if (!name) { name = "extension"; - registerProcPtr = RegisterOtherDevice; } - if (!name || !registerProcPtr) + if (!name) dmxLog(dmxFatal, "Cannot add device %s\n", dmxLocal->name); pDevice = AddInputDevice(serverClient, dmxDeviceOnOff, TRUE); @@ -738,8 +734,6 @@ static DeviceIntPtr dmxAddDevice(DMXLocalInputInfoPtr dmxLocal) pDevice->type = atom; pDevice->name = devname; - registerProcPtr(pDevice); - if (dmxLocal->isCore && dmxLocal->type == DMX_LOCAL_MOUSE) { #if 00 /*BP*/ miRegisterPointerDevice(screenInfo.screens[0], pDevice); diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index fcb02b5b3..a4691dfec 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -943,8 +943,6 @@ KdAddKeyboard (KdKeyboardInfo *ki) return !Success; } - RegisterOtherDevice(ki->dixdev); - #ifdef DEBUG ErrorF("added keyboard %s with dix id %d\n", ki->name, ki->dixdev->id); #endif @@ -1012,8 +1010,6 @@ KdAddPointer (KdPointerInfo *pi) return BadDevice; } - RegisterOtherDevice(pi->dixdev); - for (prev = &kdPointers; *prev; prev = &(*prev)->next); *prev = pi; diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c index 801aaa0b4..60b59c164 100644 --- a/hw/vfb/InitInput.c +++ b/hw/vfb/InitInput.c @@ -138,10 +138,8 @@ InitInput(int argc, char *argv[]) Atom xiclass; p = AddInputDevice(serverClient, vfbMouseProc, TRUE); k = AddInputDevice(serverClient, vfbKeybdProc, TRUE); - RegisterPointerDevice(p); xiclass = MakeAtom(XI_MOUSE, sizeof(XI_MOUSE) - 1, TRUE); AssignTypeAndName(p, xiclass, "Xvfb mouse"); - RegisterKeyboardDevice(k); xiclass = MakeAtom(XI_KEYBOARD, sizeof(XI_KEYBOARD) - 1, TRUE); AssignTypeAndName(k, xiclass, "Xvfb keyboard"); (void)mieqInit(); diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index f773ac2d6..0428673c4 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -353,7 +353,6 @@ xf86ActivateDevice(LocalDevicePtr local) dev->config_info = xf86SetStrOption(local->options, "config_info", NULL); - RegisterOtherDevice(dev); XkbSetExtension(dev, ProcessKeyboardEvent); if (serverGeneration == 1) diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index a99c0f155..2362faca5 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -468,7 +468,6 @@ void InitInput( int argc, char **argv ) XkbSetRulesDflts(&rmlvo); darwinKeyboard = AddInputDevice(serverClient, DarwinKeybdProc, TRUE); - RegisterKeyboardDevice( darwinKeyboard ); darwinKeyboard->name = strdup("keyboard"); /* here's the snippet from the current gdk sources: @@ -486,19 +485,15 @@ void InitInput( int argc, char **argv ) */ darwinPointer = AddInputDevice(serverClient, DarwinMouseProc, TRUE); - RegisterPointerDevice( darwinPointer ); darwinPointer->name = strdup("pointer"); darwinTabletStylus = AddInputDevice(serverClient, DarwinTabletProc, TRUE); - RegisterPointerDevice( darwinTabletStylus ); darwinTabletStylus->name = strdup("pen"); darwinTabletCursor = AddInputDevice(serverClient, DarwinTabletProc, TRUE); - RegisterPointerDevice( darwinTabletCursor ); darwinTabletCursor->name = strdup("cursor"); darwinTabletEraser = AddInputDevice(serverClient, DarwinTabletProc, TRUE); - RegisterPointerDevice( darwinTabletEraser ); darwinTabletEraser->name = strdup("eraser"); darwinTabletCurrent = darwinTabletStylus; diff --git a/hw/xquartz/darwinXinput.c b/hw/xquartz/darwinXinput.c index 19aefb153..966aaf3e5 100644 --- a/hw/xquartz/darwinXinput.c +++ b/hw/xquartz/darwinXinput.c @@ -120,7 +120,6 @@ AddOtherInputDevices(void) dev = (DeviceIntPtr) AddInputDevice(deviceProc, TRUE); dev->public.devicePrivate = private; - RegisterOtherDevice(dev); dev->inited = ((*dev->deviceProc)(dev, DEVICE_INIT) == Success); ************************************************************************/ DEBUG_LOG("AddOtherInputDevices\n"); diff --git a/hw/xwin/InitInput.c b/hw/xwin/InitInput.c index 705e618de..563adb6c1 100644 --- a/hw/xwin/InitInput.c +++ b/hw/xwin/InitInput.c @@ -137,10 +137,6 @@ InitInput (int argc, char *argv[]) g_pwinPointer = AddInputDevice (serverClient, winMouseProc, TRUE); g_pwinKeyboard = AddInputDevice (serverClient, winKeybdProc, TRUE); - - RegisterPointerDevice (g_pwinPointer); - RegisterKeyboardDevice (g_pwinKeyboard); - g_pwinPointer->name = strdup("Windows mouse"); g_pwinKeyboard->name = strdup("Windows keyboard"); diff --git a/include/exevents.h b/include/exevents.h index 39e1c70fe..b64252f36 100644 --- a/include/exevents.h +++ b/include/exevents.h @@ -146,10 +146,6 @@ typedef struct _GrabParameters { } GrabParameters; -extern void -RegisterOtherDevice ( - DeviceIntPtr /* device */); - extern int UpdateDeviceState ( DeviceIntPtr /* device */, diff --git a/include/input.h b/include/input.h index ffb1c33fa..388ef2146 100644 --- a/include/input.h +++ b/include/input.h @@ -274,12 +274,6 @@ extern _X_EXPORT int RemoveDevice( extern _X_EXPORT int NumMotionEvents(void); -extern void RegisterPointerDevice( - DeviceIntPtr /*device*/); - -extern void RegisterKeyboardDevice( - DeviceIntPtr /*device*/); - extern _X_EXPORT int dixLookupDevice( DeviceIntPtr * /* dev */, int /* id */,