Please revert commit - dix: Call DeleteInputDeviceRequest from CloseDownDevices (#14418)
Jeff Chua
jeff.chua.linux at gmail.com
Mon Apr 21 07:35:20 PDT 2008
It seems this commit is messing up my i945 screen upong killing the X
server with Ctrl+Alt+Backspace.
commit 6d22a9615a0e6ab3d00b0bcb22ff001b6ece02ae
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date: Fri Feb 22 11:01:51 2008 +1030
dix: Call DeleteInputDeviceRequest from CloseDownDevices (#14418)
Reverting this commit solves the issue. I'm using the latest git version
of Xorg.
X.Org X Server 1.5.99.1
Thanks,
Jeff
diff --git a/dix/devices.c b/dix/devices.c
index 4b20655..5a726af 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -618,12 +618,12 @@ CloseDownDevices(void)
for (dev = inputInfo.devices; dev; dev = next)
{
next = dev->next;
- CloseDevice(dev);
+ DeleteInputDeviceRequest(dev);
}
for (dev = inputInfo.off_devices; dev; dev = next)
{
next = dev->next;
- CloseDevice(dev);
+ DeleteInputDeviceRequest(dev);
}
inputInfo.devices = NULL;
inputInfo.off_devices = NULL;
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 208e23d..3cc04f0 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1338,8 +1338,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
/* 5. Built-in default. */
if (!foundPointer) {
bzero(&defPtr, sizeof(defPtr));
- defPtr.inp_identifier = "<default pointer>";
- defPtr.inp_driver = "mouse";
+ defPtr.inp_identifier = strdup("<default pointer>");
+ defPtr.inp_driver = strdup("mouse");
confInput = &defPtr;
foundPointer = TRUE;
from = X_DEFAULT;
@@ -1385,8 +1385,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
if (!found) {
xf86Msg(X_INFO, "No default mouse found, adding one\n");
bzero(&defPtr, sizeof(defPtr));
- defPtr.inp_identifier = "<default pointer>";
- defPtr.inp_driver = "mouse";
+ defPtr.inp_identifier = strdup("<default pointer>");
+ defPtr.inp_driver = strdup("mouse");
confInput = &defPtr;
foundPointer = configInput(&Pointer, confInput, from);
if (foundPointer) {
@@ -1474,8 +1474,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
/* 5. Built-in default. */
if (!foundKeyboard) {
bzero(&defKbd, sizeof(defKbd));
- defKbd.inp_identifier = "<default keyboard>";
- defKbd.inp_driver = "kbd";
+ defKbd.inp_identifier = strdup("<default keyboard>");
+ defKbd.inp_driver = strdup("kbd");
confInput = &defKbd;
foundKeyboard = TRUE;
keyboardMsg = "default keyboard configuration";
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index eafc0e9..d34238e 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -446,11 +446,19 @@ void
DeleteInputDeviceRequest(DeviceIntPtr pDev)
{
LocalDevicePtr pInfo = (LocalDevicePtr) pDev->public.devicePrivate;
- InputDriverPtr drv = pInfo->drv;
- IDevRec *idev = pInfo->conf_idev;
+ InputDriverPtr drv;
+ IDevRec *idev;
+ if (pInfo) /* need to get these before RemoveDevice */
+ {
+ drv = pInfo->drv;
+ idev = pInfo->conf_idev;
+ }
RemoveDevice(pDev);
+ if (!pInfo) /* VCP and VCK */
+ return;
+
if(drv->UnInit)
drv->UnInit(drv, pInfo, 0);
else
More information about the xorg
mailing list