CVS commit: xsrc/external/mit/xf86-input-ws/dist/src
Module Name:xsrc Committed By: macallan Date: Fri Apr 14 19:19:43 UTC 2017 Modified Files: xsrc/external/mit/xf86-input-ws/dist/src: ws.c Log Message: be somewhat smarter with mux devices: - don't trust the device type, if we're on a mux that may not be the whole story - always call ioctl(WSMOUSEIO_GCALIBCOORDS) - check .samplelen to see if we're in raw mode With this touchscreens on mux devices should Just Work(tm) even if they're not the first device on the mux. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 xsrc/external/mit/xf86-input-ws/dist/src/ws.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-ws/dist/src/ws.c diff -u xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.10 xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.11 --- xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.10 Thu Apr 6 20:55:03 2017 +++ xsrc/external/mit/xf86-input-ws/dist/src/ws.c Fri Apr 14 19:19:43 2017 @@ -265,47 +265,45 @@ wsPreInit12(InputDriverPtr drv, InputInf rc = BadValue; goto fail; } - if (priv->type == WSMOUSE_TYPE_TPANEL) { + + /* assume screen coordinate space until proven wrong */ + priv->min_x = 0; + priv->max_x = screenInfo.screens[priv->screen_no]->width - 1; + priv->min_y = 0; + priv->max_y = screenInfo.screens[priv->screen_no]->height - 1; + priv->raw = 0; + + /* don't rely on the device type - we may be listening to a mux */ + if (ioctl(pInfo->fd, WSMOUSEIO_GCALIBCOORDS, + &priv->coords) != 0) { + /* can't get absolute coordinate space - assume mouse */ + pInfo->type_name = XI_MOUSE; + } else if (priv->coords.samplelen == WSMOUSE_CALIBCOORDS_RESET) { + /* + * we're getting raw coordinates - update accordingly and hope + * that there is no other absolute positioning device on the + * same mux + */ + priv->min_x = priv->coords.minx; + priv->max_x = priv->coords.maxx; + priv->min_y = priv->coords.miny; + priv->max_y = priv->coords.maxy; + priv->raw = 1; pInfo->type_name = XI_TOUCHSCREEN; - priv->raw = xf86SetBoolOption(pInfo->options, "Raw", 1); } else { - pInfo->type_name = XI_MOUSE; - priv->raw = xf86SetBoolOption(pInfo->options, "Raw", 0); - if (priv->raw) { - xf86Msg(X_WARNING, "Device is not a touch panel," - "ignoring 'Option \"Raw\"'\n"); - priv->raw = 0; - } + /* + * touchscreen not in raw mode, should send us screen + * coordinates + */ + pInfo->type_name = XI_TOUCHSCREEN; } + if (priv->raw) { xf86Msg(X_CONFIG, "%s device will work in raw mode\n", pInfo->name); } - if (priv->type == WSMOUSE_TYPE_TPANEL && priv->raw) { - - if (ioctl(pInfo->fd, WSMOUSEIO_GCALIBCOORDS, - &priv->coords) != 0) { - xf86Msg(X_ERROR, "GCALIBCOORDS failed %s\n", - strerror(errno)); - wsClose(pInfo); - rc = BadValue; - goto fail; - } - /* get default coordinate space from kernel */ - priv->min_x = priv->coords.minx; - priv->max_x = priv->coords.maxx; - priv->min_y = priv->coords.miny; - priv->max_y = priv->coords.maxy; - } else { - /* in calibrated mode, coordinate space, is screen coords */ - priv->min_x = 0; - priv->max_x = screenInfo.screens[priv->screen_no]->width - 1; - priv->min_y = 0; - priv->max_y = screenInfo.screens[priv->screen_no]->height - 1; - } - /* Allow options to override this */ priv->min_x = xf86SetIntOption(pInfo->options, "MinX", priv->min_x); xf86Msg(X_INFO, "%s minimum x position: %d\n",
CVS commit: xsrc/external/mit/xf86-input-ws/dist/src
Module Name:xsrc Committed By: macallan Date: Thu Apr 6 20:55:03 UTC 2017 Modified Files: xsrc/external/mit/xf86-input-ws/dist/src: ws.c Log Message: we can get calibration data from the kernel now with this ( and a bunch of previous commits ) the touchscreen on my Acer Aspire V5 works properly To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 xsrc/external/mit/xf86-input-ws/dist/src/ws.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-ws/dist/src/ws.c diff -u xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.9 xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.10 --- xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.9 Tue Aug 16 06:29:28 2016 +++ xsrc/external/mit/xf86-input-ws/dist/src/ws.c Thu Apr 6 20:55:03 2017 @@ -283,32 +283,29 @@ wsPreInit12(InputDriverPtr drv, InputInf pInfo->name); } -#ifndef __NetBSD__ if (priv->type == WSMOUSE_TYPE_TPANEL && priv->raw) { + if (ioctl(pInfo->fd, WSMOUSEIO_GCALIBCOORDS, &priv->coords) != 0) { - xf86Msg(X_ERROR, "GCALIBCOORS failed %s\n", + xf86Msg(X_ERROR, "GCALIBCOORDS failed %s\n", strerror(errno)); wsClose(pInfo); rc = BadValue; goto fail; } - /* get default coordinate space from kernel */ priv->min_x = priv->coords.minx; priv->max_x = priv->coords.maxx; priv->min_y = priv->coords.miny; priv->max_y = priv->coords.maxy; } else { -#endif /* in calibrated mode, coordinate space, is screen coords */ priv->min_x = 0; priv->max_x = screenInfo.screens[priv->screen_no]->width - 1; priv->min_y = 0; priv->max_y = screenInfo.screens[priv->screen_no]->height - 1; -#ifndef __NetBSD__ } -#endif + /* Allow options to override this */ priv->min_x = xf86SetIntOption(pInfo->options, "MinX", priv->min_x); xf86Msg(X_INFO, "%s minimum x position: %d\n",
CVS commit: xsrc/external/mit/xf86-input-ws/dist/src
Module Name:xsrc Committed By: mrg Date: Tue Aug 16 06:29:28 UTC 2016 Modified Files: xsrc/external/mit/xf86-input-ws/dist/src: ws.c ws.h Log Message: apply const from xorg-server 1.18 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 xsrc/external/mit/xf86-input-ws/dist/src/ws.c cvs rdiff -u -r1.1.1.2 -r1.2 xsrc/external/mit/xf86-input-ws/dist/src/ws.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-ws/dist/src/ws.c diff -u xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.8 xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.9 --- xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.8 Mon Sep 26 18:04:36 2011 +++ xsrc/external/mit/xf86-input-ws/dist/src/ws.c Tue Aug 16 06:29:28 2016 @@ -132,6 +132,7 @@ wsPreInit12(InputDriverPtr drv, InputInf WSDevicePtr priv; MessageType buttons_from = X_CONFIG; char *s; + const char *cs; int rc; priv = (WSDevicePtr)calloc(1, sizeof(WSDeviceRec)); @@ -235,22 +236,22 @@ wsPreInit12(InputDriverPtr drv, InputInf } priv->inv_x = 0; priv->inv_y = 0; - s = xf86FindOptionValue(pInfo->options, "Rotate"); - if (s) { - if (xf86NameCmp(s, "CW") == 0) { + cs = xf86FindOptionValue(pInfo->options, "Rotate"); + if (cs) { + if (xf86NameCmp(cs, "CW") == 0) { priv->inv_x = 1; priv->inv_y = 0; priv->swap_axes = 1; - } else if (xf86NameCmp(s, "CCW") == 0) { + } else if (xf86NameCmp(cs, "CCW") == 0) { priv->inv_x = 0; priv->inv_y = 1; priv->swap_axes = 1; - } else if (xf86NameCmp(s, "UD") == 0) { + } else if (xf86NameCmp(cs, "UD") == 0) { priv->inv_x = 1; priv->inv_y = 1; } else { xf86Msg(X_ERROR, "\"%s\" is not a valid value " -"for Option \"Rotate\"\n", s); +"for Option \"Rotate\"\n", cs); xf86Msg(X_ERROR, "Valid options are \"CW\", \"CCW\"," " or \"UD\"\n"); } Index: xsrc/external/mit/xf86-input-ws/dist/src/ws.h diff -u xsrc/external/mit/xf86-input-ws/dist/src/ws.h:1.1.1.2 xsrc/external/mit/xf86-input-ws/dist/src/ws.h:1.2 --- xsrc/external/mit/xf86-input-ws/dist/src/ws.h:1.1.1.2 Tue Aug 2 09:28:21 2011 +++ xsrc/external/mit/xf86-input-ws/dist/src/ws.h Tue Aug 16 06:29:28 2016 @@ -33,7 +33,7 @@ extern int ws_debug_level; #define NUMEVENTS 16 /* max # of ws events to read at once */ typedef struct WSDevice { - char *devName; /* device name */ + const char *devName; /* device name */ int type; /* ws device type */ unsigned int buttons; /* # of buttons */ unsigned int lastButtons; /* last state of buttons */
CVS commit: xsrc/external/mit/xf86-input-ws/dist/src
Module Name:xsrc Committed By: tsutsui Date: Mon Sep 26 18:04:37 UTC 2011 Modified Files: xsrc/external/mit/xf86-input-ws/dist/src: ws.c Log Message: Also wrap variables used only in !__NetBSD__ block. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 xsrc/external/mit/xf86-input-ws/dist/src/ws.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-ws/dist/src/ws.c diff -u xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.7 xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.8 --- xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.7 Mon Sep 26 14:47:53 2011 +++ xsrc/external/mit/xf86-input-ws/dist/src/ws.c Mon Sep 26 18:04:36 2011 @@ -501,7 +501,9 @@ wsDeviceOn(DeviceIntPtr pWS) { InputInfoPtr pInfo = (InputInfoPtr)pWS->public.devicePrivate; WSDevicePtr priv = (WSDevicePtr)pInfo->private; +#ifndef __NetBSD__ struct wsmouse_calibcoords coords; +#endif DBG(1, ErrorF("WS DEVICE ON\n")); if ((pInfo->fd < 0) && (wsOpen(pInfo) != Success)) { @@ -549,7 +551,9 @@ wsDeviceOff(DeviceIntPtr pWS) { InputInfoPtr pInfo = (InputInfoPtr)pWS->public.devicePrivate; WSDevicePtr priv = pInfo->private; +#ifndef __NetBSD__ struct wsmouse_calibcoords coords; +#endif DBG(1, ErrorF("WS DEVICE OFF\n")); wsmbEmuFinalize(pInfo);
CVS commit: xsrc/external/mit/xf86-input-ws/dist/src
Module Name:xsrc Committed By: tsutsui Date: Mon Sep 26 14:47:53 UTC 2011 Modified Files: xsrc/external/mit/xf86-input-ws/dist/src: ws.c Log Message: Restore #ifndef __NetBSD__ portions (disabling OpenBSD specific TPANEL stuff?) which were accidentally removed in rev 1.4: > merge xf86-input-ws 1.3.0 from openbsd-current. Pointed out by nonaka@, and this fixes WSMOUSEIO_SCALIBCOORDS ioctl errors and coredumps after the driver is loaded on hpcarm W-ZERO3. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xf86-input-ws/dist/src/ws.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-ws/dist/src/ws.c diff -u xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.6 xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.7 --- xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.6 Mon Sep 26 14:38:59 2011 +++ xsrc/external/mit/xf86-input-ws/dist/src/ws.c Mon Sep 26 14:47:53 2011 @@ -282,6 +282,7 @@ wsPreInit12(InputDriverPtr drv, InputInf pInfo->name); } +#ifndef __NetBSD__ if (priv->type == WSMOUSE_TYPE_TPANEL && priv->raw) { if (ioctl(pInfo->fd, WSMOUSEIO_GCALIBCOORDS, &priv->coords) != 0) { @@ -298,12 +299,15 @@ wsPreInit12(InputDriverPtr drv, InputInf priv->min_y = priv->coords.miny; priv->max_y = priv->coords.maxy; } else { +#endif /* in calibrated mode, coordinate space, is screen coords */ priv->min_x = 0; priv->max_x = screenInfo.screens[priv->screen_no]->width - 1; priv->min_y = 0; priv->max_y = screenInfo.screens[priv->screen_no]->height - 1; +#ifndef __NetBSD__ } +#endif /* Allow options to override this */ priv->min_x = xf86SetIntOption(pInfo->options, "MinX", priv->min_x); xf86Msg(X_INFO, "%s minimum x position: %d\n", @@ -506,6 +510,7 @@ wsDeviceOn(DeviceIntPtr pWS) return !Success; } +#ifndef __NetBSD__ if (priv->type == WSMOUSE_TYPE_TPANEL) { /* get calibration values */ if (ioctl(pInfo->fd, WSMOUSEIO_GCALIBCOORDS, &coords) != 0) { @@ -525,6 +530,7 @@ wsDeviceOn(DeviceIntPtr pWS) } } } +#endif priv->buffer = XisbNew(pInfo->fd, sizeof(struct wscons_event) * NUMEVENTS); if (priv->buffer == NULL) { @@ -547,6 +553,7 @@ wsDeviceOff(DeviceIntPtr pWS) DBG(1, ErrorF("WS DEVICE OFF\n")); wsmbEmuFinalize(pInfo); +#ifndef __NetBSD__ if (priv->type == WSMOUSE_TYPE_TPANEL) { /* Restore calibration data */ memcpy(&coords, &priv->coords, sizeof coords); @@ -555,6 +562,7 @@ wsDeviceOff(DeviceIntPtr pWS) strerror(errno)); } } +#endif if (pInfo->fd >= 0) { xf86RemoveEnabledDevice(pInfo); wsClose(pInfo);
CVS commit: xsrc/external/mit/xf86-input-ws/dist/src
Module Name:xsrc Committed By: tsutsui Date: Mon Sep 26 14:38:59 UTC 2011 Modified Files: xsrc/external/mit/xf86-input-ws/dist/src: ws.c Log Message: Use #ifndef __NetBSD__ instead of #if 0 which were added in rev 1.5: > port to netbsd wscons To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xf86-input-ws/dist/src/ws.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-ws/dist/src/ws.c diff -u xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.5 xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.6 --- xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.5 Tue Aug 2 09:33:33 2011 +++ xsrc/external/mit/xf86-input-ws/dist/src/ws.c Mon Sep 26 14:38:59 2011 @@ -892,7 +892,7 @@ wsSetProperty(DeviceIntPtr device, Atom priv->coords.maxx = priv->max_x; priv->coords.miny = priv->min_y; priv->coords.maxy = priv->max_y; -#if 0 +#ifndef __NetBSD__ priv->coords.swapxy = priv->swap_axes; #endif @@ -901,11 +901,11 @@ wsSetProperty(DeviceIntPtr device, Atom coords.maxx = priv->max_x; coords.miny = priv->min_y; coords.maxy = priv->max_y; -#if 0 +#ifndef __NetBSD__ coords.swapxy = priv->swap_axes; #endif coords.samplelen = priv->raw; -#if 0 +#ifndef __NetBSD__ coords.resx = priv->coords.resx; coords.resy = priv->coords.resy; #endif
CVS commit: xsrc/external/mit/xf86-input-ws/dist/src
Module Name:xsrc Committed By: mrg Date: Tue Aug 2 09:33:33 UTC 2011 Modified Files: xsrc/external/mit/xf86-input-ws/dist/src: emumb.c ws.c Log Message: port to netbsd wscons To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 xsrc/external/mit/xf86-input-ws/dist/src/emumb.c cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xf86-input-ws/dist/src/ws.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-ws/dist/src/emumb.c diff -u xsrc/external/mit/xf86-input-ws/dist/src/emumb.c:1.1.1.2 xsrc/external/mit/xf86-input-ws/dist/src/emumb.c:1.2 --- xsrc/external/mit/xf86-input-ws/dist/src/emumb.c:1.1.1.2 Tue Aug 2 09:28:21 2011 +++ xsrc/external/mit/xf86-input-ws/dist/src/emumb.c Tue Aug 2 09:33:33 2011 @@ -36,6 +36,9 @@ #include "config.h" #endif +#include +#include + #include #include #include Index: xsrc/external/mit/xf86-input-ws/dist/src/ws.c diff -u xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.4 xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.5 --- xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.4 Tue Aug 2 09:30:15 2011 +++ xsrc/external/mit/xf86-input-ws/dist/src/ws.c Tue Aug 2 09:33:33 2011 @@ -892,17 +892,23 @@ priv->coords.maxx = priv->max_x; priv->coords.miny = priv->min_y; priv->coords.maxy = priv->max_y; +#if 0 priv->coords.swapxy = priv->swap_axes; +#endif /* Update the kernel calibration table */ coords.minx = priv->min_x; coords.maxx = priv->max_x; coords.miny = priv->min_y; coords.maxy = priv->max_y; +#if 0 coords.swapxy = priv->swap_axes; +#endif coords.samplelen = priv->raw; +#if 0 coords.resx = priv->coords.resx; coords.resy = priv->coords.resy; +#endif if (ioctl(pInfo->fd, WSMOUSEIO_SCALIBCOORDS, &coords) != 0) { xf86Msg(X_ERROR, "SCALIBCOORDS failed %s\n", strerror(errno));
CVS commit: xsrc/external/mit/xf86-input-ws/dist/src
Module Name:xsrc Committed By: mbalmer Date: Fri Dec 11 16:04:30 UTC 2009 Modified Files: xsrc/external/mit/xf86-input-ws/dist/src: ws.c Log Message: Fix SwapXY and rotation support. From OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xf86-input-ws/dist/src/ws.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-ws/dist/src/ws.c diff -u xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.2 xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.3 --- xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.2 Tue Dec 8 09:55:38 2009 +++ xsrc/external/mit/xf86-input-ws/dist/src/ws.c Fri Dec 11 16:04:30 2009 @@ -13,7 +13,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $OpenBSD: ws.c,v 1.26 2009/11/26 18:18:34 matthieu Exp $ */ +/* $OpenBSD: ws.c,v 1.28 2009/12/10 22:32:02 matthieu Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -422,6 +422,15 @@ ymax = -1; } + if (priv->swap_axes) { + int tmp; + tmp = xmin; + xmin = ymin; + ymin = tmp; + tmp = xmax; + xmax = ymax; + ymax = tmp; + } #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 if ((priv->type == WSMOUSE_TYPE_TPANEL)) { axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X); @@ -459,6 +468,7 @@ #endif ymin, ymax, 1, 0, 1); xf86InitValuatorDefaults(pWS, 1); + xf86MotionHistoryAllocate(pInfo); AssignTypeAndName(pWS, pInfo->atom, pInfo->name); pWS->public.on = FALSE; @@ -603,11 +613,11 @@ break; case WSCONS_EVENT_MOUSE_ABSOLUTE_X: DBG(4, ErrorF("Absolute X %d\n", event->value)); - if (event->value != 4095) { -ax = event->value; -if (priv->inv_x) - ax = priv->max_x - ax + priv->min_x; - } + if (event->value == 4095) +break; + ax = event->value; + if (priv->inv_x) +ax = priv->max_x - ax + priv->min_x; break; case WSCONS_EVENT_MOUSE_ABSOLUTE_Y: DBG(4, ErrorF("Absolute Y %d\n", event->value)); @@ -687,6 +697,13 @@ buttons &= ~zbutton; wsSendButtons(pInfo, buttons); } + if (priv->swap_axes) { + int tmp; + + tmp = ax; + ax = ay; + ay = tmp; + } if (ax) { /* absolute position event */ DBG(3, ErrorF("postMotionEvent X %d\n", ax)); @@ -851,10 +868,17 @@ need_update++; } /* Update axes descriptors */ - ax->min_value = priv->min_x; - ax->max_value = priv->max_x; - ay->min_value = priv->min_y; - ay->max_value = priv->max_y; + if (!priv->swap_axes) { +ax->min_value = priv->min_x; +ax->max_value = priv->max_x; +ay->min_value = priv->min_y; +ay->max_value = priv->max_y; + } else { +ax->min_value = priv->min_y; +ax->max_value = priv->max_y; +ay->min_value = priv->min_x; +ay->max_value = priv->max_x; + } } } else if (atom == prop_swap) { if (val->format != 8 || val->type != XA_INTEGER ||
CVS commit: xsrc/external/mit/xf86-input-ws/dist/src
Module Name:xsrc Committed By: mbalmer Date: Tue Dec 8 09:55:38 UTC 2009 Modified Files: xsrc/external/mit/xf86-input-ws/dist/src: ws.c Log Message: Remove the input driver before returning NULL on error in PreInit(). >From OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 xsrc/external/mit/xf86-input-ws/dist/src/ws.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-ws/dist/src/ws.c diff -u xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.1.1.1 xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.2 --- xsrc/external/mit/xf86-input-ws/dist/src/ws.c:1.1.1.1 Fri Nov 27 14:17:19 2009 +++ xsrc/external/mit/xf86-input-ws/dist/src/ws.c Tue Dec 8 09:55:38 2009 @@ -340,10 +340,13 @@ pInfo->flags |= XI86_CONFIGURED; return pInfo; fail: - if (priv != NULL) + if (priv != NULL) { xfree(priv); - if (pInfo != NULL) - xfree(pInfo); + pInfo->private = NULL; + } + if (pInfo != NULL) { + xf86DeleteInput(pInfo, 0); + } return NULL; }