summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2004-07-26 22:52:31 +0000
committerMatthieu Herrb <matthieu.herrb@laas.fr>2004-07-26 22:52:31 +0000
commit9a0f97bdde8102e82b51ea77bc03175008d9df77 (patch)
tree2dc048cca7cb6ee2b2f7e86c4e172832246c9d55
parent1935b4e30e802f262a83e8f54bbd79495c91105d (diff)
after server reset. - Call InitPtrFeedbackClassDeviceStruct() during DEVICE_INIT phase, in order to avoid a segfault in the X server caused by 'xset q'.
-rw-r--r--src/xf86Elo.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/xf86Elo.c b/src/xf86Elo.c
index 6ea52a4..09ceb40 100644
--- a/src/xf86Elo.c
+++ b/src/xf86Elo.c
@@ -1165,13 +1165,13 @@ xf86EloPrintIdent(unsigned char *packet,
*
***************************************************************************
*/
-#if 0
+
static void
xf86EloPtrControl(DeviceIntPtr dev,
PtrCtrl *ctrl)
{
}
-#endif
+
/*
@@ -1283,7 +1283,10 @@ xf86EloControl(DeviceIntPtr dev,
ErrorF("Unable to allocate Elographics touchscreen FocusClassDeviceStruct\n");
return !Success;
}
-
+ if (InitPtrFeedbackClassDeviceStruct(dev, xf86EloPtrControl) == FALSE) {
+ ErrorF("unable to init ptr feedback\n");
+ return !Success;
+ }
/*
* Device reports motions on 2 axes in absolute coordinates.
* Axes min and max values are reported in raw coordinates.
@@ -1466,7 +1469,11 @@ xf86EloControl(DeviceIntPtr dev,
DBG(2, ErrorF("Elographics touchscreen close...\n"));
dev->public.on = FALSE;
if (local->fd >= 0) {
- RemoveEnabledDevice(local->fd);
+#ifdef XFREE86_V4
+ xf86RemoveEnabledDevice(local);
+#else
+ RemoveEnabledDevice(local->fd);
+#endif
}
SYSCALL(close(local->fd));
local->fd = -1;