xserver-xorg-input-mouse: Changes to 'upstream-unstable'
.gitignore | 76 +++
COPYING | 50 +-
Makefile.am | 16
README | 340 +++++++---------
README.sgml | 1125 ------------------------------------------------------
configure.ac | 59 +-
man/Makefile.am | 65 +--
man/mousedrv.man | 27 -
src/Makefile.am | 3
src/bsd_mouse.c | 44 +-
src/hurd_mouse.c | 35 -
src/lnx_mouse.c | 21 -
src/mouse.c | 460 +++++++++-------------
src/mouse.h | 260 ++++++++++++
src/pnp.c | 4
src/sco_mouse.c | 258 ------------
src/sun_mouse.c | 193 +++++----
src/xf86OSmouse.h | 277 -------------
18 files changed, 943 insertions(+), 2370 deletions(-)
New commits:
commit 2e507df6704ebd2cab6ada450ed40d89a2d3ca19
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Feb 21 10:06:54 2011 +1000
mouse 1.6.99.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index ad57273..ed7c6fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-input-mouse],
- [1.6.99],
+ [1.6.99.901],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-input-mouse])
AC_CONFIG_SRCDIR([Makefile.am])
commit 70f1d8579ef86dd428eabcb3752b5d1bce47b8f7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Feb 21 09:40:13 2011 +1000
man: ClearDTR and ClearRTS are handled by the X server.
If it breaks, we know who to blame (or file a bug against).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
diff --git a/man/mousedrv.man b/man/mousedrv.man
index 917ca8e..23528f6 100644
--- a/man/mousedrv.man
+++ b/man/mousedrv.man
@@ -281,13 +281,15 @@ indicating that the next button pressed is to be
.BI "Option \*qClearDTR\*q \*q" boolean \*q
Enable/disable clearing the DTR line on the serial port used by the mouse.
Some dual-protocol mice require the DTR line to be cleared to operate
-in the non-default protocol. This option is for serial mice only.
+in the non-default protocol. This option is for serial mice only and is
+handled by the X server.
Default: off.
.TP 7
.BI "Option \*qClearRTS\*q \*q" boolean \*q
Enable/disable clearing the RTS line on the serial port used by the mouse.
Some dual-protocol mice require the RTS line to be cleared to operate
-in the non-default protocol. This option is for serial mice only.
+in the non-default protocol. This option is for serial mice only and is
+handled by the X server.
Default: off.
.TP 7
.BI "Option \*qBaudRate\*q \*q" integer \*q
commit 194c5913e92c84d1a30447d43b5beee77a98b7ba
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Feb 21 09:33:37 2011 +1000
man: protocol option isn't mandatory, it's platform-specific.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
diff --git a/man/mousedrv.man b/man/mousedrv.man
index f9b9993..917ca8e 100644
--- a/man/mousedrv.man
+++ b/man/mousedrv.man
@@ -106,8 +106,8 @@ NetMousePS/2, NetScrollPS/2, BusMouse, SysMouse, WSMouse, USB, VUID, Xqueue.
.PP
.RS 7
Not all protocols are supported on all platforms. The "Auto" protocol
-specifies that protocol auto-detection should be attempted. There is no
-default protocol setting, and specifying this option is mandatory.
+specifies that protocol auto-detection should be attempted. The default
+protocol setting is platform-specific.
.RE
.TP 7
.BI "Option \*qDevice\*q \*q" string \*q
commit f70a9817a2eb845eb9718c0ed6540de1ffe7e531
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Feb 21 09:30:36 2011 +1000
man: fix typo "Auto platform" → "Auto protocol"
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
diff --git a/man/mousedrv.man b/man/mousedrv.man
index 7be4935..f9b9993 100644
--- a/man/mousedrv.man
+++ b/man/mousedrv.man
@@ -105,7 +105,7 @@ NetMousePS/2, NetScrollPS/2, BusMouse, SysMouse, WSMouse, USB, VUID, Xqueue.
.RE
.PP
.RS 7
-Not all protocols are supported on all platforms. The "Auto" platform
+Not all protocols are supported on all platforms. The "Auto" protocol
specifies that protocol auto-detection should be attempted. There is no
default protocol setting, and specifying this option is mandatory.
.RE
commit a45b5d0eaf871c139b057f757869a20fd617d529
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Feb 21 09:29:59 2011 +1000
man: README.mouse is just README
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
diff --git a/man/mousedrv.man b/man/mousedrv.man
index 13db918..7be4935 100644
--- a/man/mousedrv.man
+++ b/man/mousedrv.man
@@ -86,8 +86,9 @@ platforms this is limited to plug and play serial mice, and on some the
auto-detection works for any mouse that the OS's kernel driver supports.
On others, it is always necessary to specify the mouse protocol in the
config file. The
-.I README.mouse
-document contains some detailed information about this.
+.I README
+document provided with this driver contains some detailed information about
+this.
.PP
The following driver
.B Options
commit 9140e2640319833658a2be5ab2f8349a79ff20aa
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Feb 21 09:28:26 2011 +1000
man: add mention of xorg.conf.d snippet
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
diff --git a/man/mousedrv.man b/man/mousedrv.man
index a6b443d..13db918 100644
--- a/man/mousedrv.man
+++ b/man/mousedrv.man
@@ -73,8 +73,9 @@ what matters.
.SH CONFIGURATION DETAILS
.PP
Depending on the X server version in use, input device options may be set
-in either a __xconfigfile__ file, or in the configuration files read by the
-Hardware Abstraction Layer (HAL) daemon, hald(1).
+in either a __xconfigfile__ file, an xorg.conf.d snippet
+or in the configuration files read by the Hardware Abstraction Layer (HAL)
+daemon, hald(1).
.PP
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
details and for options that can be used with all input drivers. This
commit af784aad332d67bb746597d5de032ca320928d51
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Feb 21 09:24:38 2011 +1000
man: remove mention of core pointer.
This doesn't apply to X servers 1.7 and later.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
diff --git a/man/mousedrv.man b/man/mousedrv.man
index e805335..a6b443d 100644
--- a/man/mousedrv.man
+++ b/man/mousedrv.man
@@ -21,9 +21,8 @@ types of mice depends on the OS.
.PP
The
.B mouse
-driver functions as a pointer input device, and may be used as the
-X server's core pointer. Multiple mice are supported by multiple
-instances of this driver.
+driver functions as a pointer input device. Multiple mice are supported by
+multiple instances of this driver.
.SH SUPPORTED HARDWARE
.TP
USB mouse
commit 6b5a82e4e85ab12df23ecf30f2b07eb4c5763e93
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Nov 29 22:25:52 2010 -0800
Add ABI checks around XI86_CONFIGURED uses in OS-specific PreInits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c
index 8a57226..e9e2649 100644
--- a/src/bsd_mouse.c
+++ b/src/bsd_mouse.c
@@ -483,7 +483,9 @@ wsconsPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
pInfo->read_input = wsconsReadInput;
pMse->xisbscale = sizeof(struct wscons_event);
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
pInfo->flags |= XI86_CONFIGURED;
+#endif
return TRUE;
}
#endif
@@ -746,7 +748,9 @@ usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
pInfo->device_control = usbMouseProc;
pInfo->read_input = usbReadInput;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
pInfo->flags |= XI86_CONFIGURED;
+#endif
return TRUE;
}
#endif /* USBMOUSE */
diff --git a/src/hurd_mouse.c b/src/hurd_mouse.c
index e5c7186..a285a87 100644
--- a/src/hurd_mouse.c
+++ b/src/hurd_mouse.c
@@ -167,7 +167,9 @@ OsMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags)
/* Setup the local procs. */
pInfo->read_input = OsMouseReadInput;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
pInfo->flags |= XI86_CONFIGURED;
+#endif
return TRUE;
}
diff --git a/src/sun_mouse.c b/src/sun_mouse.c
index 2799947..dd545c7 100644
--- a/src/sun_mouse.c
+++ b/src/sun_mouse.c
@@ -297,7 +297,9 @@ vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
pVuidMse->next = vuidMouseList;
vuidMouseList = pVuidMse;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
pInfo->flags |= XI86_CONFIGURED;
+#endif
return TRUE;
}
commit 73bb42e10033cfeb41ba540ea0303b882ff7e61e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Nov 25 11:35:29 2010 +1000
Bump to 1.6.99
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index 8c99ac5..ad57273 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-input-mouse],
- [1.6.0],
+ [1.6.99],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-input-mouse])
AC_CONFIG_SRCDIR([Makefile.am])
commit 0a088df6b2f5cac05a00c4f461274b83feb1a9a8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Oct 25 14:34:28 2010 +1000
Adjust to new Input ABI 12.
New PreInit prototype and a couple of other minor changes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c
index 94d4382..8a57226 100644
--- a/src/bsd_mouse.c
+++ b/src/bsd_mouse.c
@@ -458,7 +458,7 @@ wsconsPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol);
/* Collect the options, and process the common options. */
- xf86CollectInputOptions(pInfo, NULL, NULL);
+ COLLECT_INPUT_OPTIONS(pInfo, NULL);
xf86ProcessCommonOptions(pInfo, pInfo->options);
/* Check if the device can be opened. */
@@ -653,7 +653,7 @@ usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol);
/* Collect the options, and process the common options. */
- xf86CollectInputOptions(pInfo, NULL, NULL);
+ COLLECT_INPUT_OPTIONS(pInfo, NULL);
xf86ProcessCommonOptions(pInfo, pInfo->options);
/* Check if the device can be opened. */
diff --git a/src/hurd_mouse.c b/src/hurd_mouse.c
index e0ed126..e5c7186 100644
--- a/src/hurd_mouse.c
+++ b/src/hurd_mouse.c
@@ -144,7 +144,7 @@ OsMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags)
xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol);
/* Collect the options, and process the common options. */
- xf86CollectInputOptions(pInfo, NULL, NULL);
+ COLLECT_INPUT_OPTIONS(pInfo, NULL);
xf86ProcessCommonOptions(pInfo, pInfo->options);
/* Check if the device can be opened. */
diff --git a/src/mouse.c b/src/mouse.c
index 7088abc..d2377ad 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -112,7 +112,11 @@ typedef struct _DragLockRec {
} DragLockRec, *DragLockPtr;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
static InputInfoPtr MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags);
+#else
+static int MousePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
+#endif
static int MouseProc(DeviceIntPtr device, int what);
static void MouseCtrl(DeviceIntPtr device, PtrCtrl *ctrl);
@@ -842,10 +846,48 @@ MousePickProtocol(InputInfoPtr pInfo, const char* device,
return protocol;
}
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
+static int NewMousePreInit(InputDriverPtr drv, InputInfoPtr pInfo,
+ int flags);
+
static InputInfoPtr
MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
{
InputInfoPtr pInfo;
+
+ if (!(pInfo = xf86AllocateInput(drv, 0)))
+ return NULL;
+
+ pInfo->name = dev->identifier;
+ pInfo->flags = XI86_SEND_DRAG_EVENTS;
+ pInfo->conf_idev = dev;
+ pInfo->close_proc = NULL;
+ pInfo->private_flags = 0;
+ pInfo->always_core_feedback = NULL;
+
+ if (NewMousePreInit(drv, pInfo, flags) == Success)
+ {
+ /* Check if SendDragEvents has been disabled. */
+ if (!xf86SetBoolOption(dev->commonOptions, "SendDragEvents", TRUE))
+ pInfo->flags &= ~XI86_SEND_DRAG_EVENTS;
+
+ pInfo->flags |= XI86_CONFIGURED;
+
+ return pInfo;
+ }
+
+ xf86DeleteInput(pInfo, 0);
+
+ return NULL;
+}
+
+static int
+NewMousePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+#else
+static int
+MousePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+#endif
+{
MouseDevPtr pMse;
mousePrivPtr mPriv;
MessageType protocolFrom = X_DEFAULT;
@@ -854,44 +896,34 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
MouseProtocolID protocolID;
MouseProtocolPtr pProto;
int i;
-
- if (!InitProtocols())
- return NULL;
+ int rc = Success;
- if (!(pInfo = xf86AllocateInput(drv, 0)))
- return NULL;
+ if (!InitProtocols())
+ return BadAlloc;
/* Initialise the InputInfoRec. */
- pInfo->name = dev->identifier;
pInfo->type_name = XI_MOUSE;
- pInfo->flags = XI86_SEND_DRAG_EVENTS;
pInfo->device_control = MouseProc;
pInfo->read_input = MouseReadInput;
pInfo->control_proc = NULL;
- pInfo->close_proc = NULL;
pInfo->switch_mode = NULL;
pInfo->fd = -1;
pInfo->dev = NULL;
- pInfo->private_flags = 0;
- pInfo->always_core_feedback = NULL;
- pInfo->conf_idev = dev;
/* Allocate the MouseDevRec and initialise it. */
if (!(pMse = calloc(sizeof(MouseDevRec), 1)))
+ {
+ rc = BadAlloc;
goto out;
+ }
pInfo->private = pMse;
pMse->Ctrl = MouseCtrl;
pMse->PostEvent = MousePostEvent;
pMse->CommonOptions = MouseCommonOptions;
- /* Check if SendDragEvents has been disabled. */
- if (!xf86SetBoolOption(dev->commonOptions, "SendDragEvents", TRUE)) {
- pInfo->flags &= ~XI86_SEND_DRAG_EVENTS;
- }
-
/* Find the protocol type. */
- protocol = xf86SetStrOption(dev->commonOptions, "Protocol", NULL);
+ protocol = xf86SetStrOption(pInfo->options, "Protocol", NULL);
if (protocol) {
protocolFrom = X_CONFIG;
} else if (osInfo->DefaultProtocol) {
@@ -900,10 +932,11 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
}
if (!protocol) {
xf86Msg(X_ERROR, "%s: No Protocol specified\n", pInfo->name);
+ rc = BadValue;
goto out;
}
- device = xf86SetStrOption(dev->commonOptions, "Device", NULL);
+ device = xf86SetStrOption(pInfo->options, "Device", NULL);
/* Default Mapping: 1 2 3 8 9 10 11 ... */
for (i = 0; i < MSE_MAXBUTTONS; i++)
@@ -916,18 +949,25 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
xf86Msg(protocolFrom, "%s: Protocol: \"%s\"\n", pInfo->name, protocol);
if (!(pProto = GetProtocol(protocolID)))
+ {
+ rc = BadValue;
goto out;
+ }
pMse->protocolID = protocolID;
pMse->oldProtocolID = protocolID; /* hack */
pMse->autoProbe = FALSE;
/* Collect the options, and process the common options. */
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
/* need some special handling here. xf86CollectInputOptions will reset
* pInfo->options if the second argument is not-null. To re-merge the
* previously set arguments, pass the original pInfo->options in.
*/
xf86CollectInputOptions(pInfo, pProto->defaults, pInfo->options);
+#else
+ COLLECT_INPUT_OPTIONS(pInfo, pProto->defaults);
+#endif
xf86ProcessCommonOptions(pInfo, pInfo->options);
/* Check if the device can be opened. */
@@ -941,6 +981,7 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
free(pMse->mousePriv);
free(pMse);
pInfo->private = NULL;
+ rc = BadValue;
goto out;
}
}
@@ -948,7 +989,11 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
pInfo->fd = -1;
if (!(mPriv = (pointer) calloc(sizeof(mousePrivRec), 1)))
+ {
+ rc = BadAlloc;
goto out;
+ }
+
pMse->mousePriv = mPriv;
pMse->CommonOptions(pInfo);
pMse->checkMovements = checkForErraticMovements;
@@ -958,11 +1003,9 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
MouseHWOptions(pInfo);
MouseSerialOptions(pInfo);
-
- pInfo->flags |= XI86_CONFIGURED;
out:
- return pInfo;
+ return rc;
}
@@ -2523,7 +2566,7 @@ initMouseHW(InputInfoPtr pInfo)
usleep(100000);
/* Set the parameters up for the MM series protocol. */
options = pInfo->options;
- xf86CollectInputOptions(pInfo, mmDefaults, NULL);
+ COLLECT_INPUT_OPTIONS(pInfo, mmDefaults);
xf86SetSerial(pInfo->fd, pInfo->options);
pInfo->options = options;
diff --git a/src/mouse.h b/src/mouse.h
index 8c02ba1..9f5b47e 100644
--- a/src/mouse.h
+++ b/src/mouse.h
@@ -32,6 +32,13 @@
#include "xf86Xinput.h"
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
+#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options), NULL)
+#else
+#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options))
+#endif
+
+
/* Mouse interface classes */
#define MSE_NONE 0x00
#define MSE_SERIAL 0x01 /* serial port */
diff --git a/src/sun_mouse.c b/src/sun_mouse.c
index 95b45bc..2799947 100644
--- a/src/sun_mouse.c
+++ b/src/sun_mouse.c
@@ -216,7 +216,7 @@ vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol);
/* Collect the options, and process the common options. */
- xf86CollectInputOptions(pInfo, NULL, NULL);
+ COLLECT_INPUT_OPTIONS(pInfo, NULL);
xf86ProcessCommonOptions(pInfo, pInfo->options);
pVuidMse->buffer = (unsigned char *)&pVuidMse->event;
commit fedd52ba781da1960ada0a96b85293afe2509a4a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Oct 25 11:16:22 2010 +1000
ABI 12 requires per-valuator modes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
diff --git a/src/mouse.c b/src/mouse.c
index e600474..7088abc 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -1540,14 +1540,22 @@ MouseProc(DeviceIntPtr device, int what)
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
axes_labels[0],
#endif
- -1, -1, 1, 0, 1);
+ -1, -1, 1, 0, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Relative
+#endif
+ );
xf86InitValuatorDefaults(device, 0);
/* Y valuator */
xf86InitValuatorAxisStruct(device, 1,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
axes_labels[1],
#endif
- -1, -1, 1, 0, 1);
+ -1, -1, 1, 0, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Relative
+#endif
+ );
xf86InitValuatorDefaults(device, 1);
#ifdef EXTMOUSEDEBUG
commit 7bf22a368c752fe76dc60c3ea0f70ec1a46d653e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Oct 25 14:36:59 2010 +1000
Use pInfo->options instead of conf-idev.
Because it doesn't really matter anyway, I think.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c
index e288f38..94d4382 100644
--- a/src/bsd_mouse.c
+++ b/src/bsd_mouse.c
@@ -329,8 +329,8 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
if (dev) {
/* Set the Device option. */
- pInfo->conf_idev->commonOptions =
- xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", dev);
+ pInfo->options =
+ xf86AddNewOption(pInfo->options, "Device", dev);
xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
pInfo->name, dev);
}
@@ -369,8 +369,8 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
SYSCALL(fd = open(*pdev, O_RDWR | O_NONBLOCK));
if (fd != -1) {
/* Set the Device option. */
- pInfo->conf_idev->commonOptions =
- xf86AddNewOption(pInfo->conf_idev->commonOptions,
+ pInfo->options =
+ xf86AddNewOption(pInfo->options,
"Device", *pdev);
xf86Msg(X_INFO, "%s: found Device \"%s\"\n",
pInfo->name, *pdev);
diff --git a/src/hurd_mouse.c b/src/hurd_mouse.c
index 45b3cf2..e0ed126 100644
--- a/src/hurd_mouse.c
+++ b/src/hurd_mouse.c
@@ -183,8 +183,8 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
return NULL;
close(fd);
- pInfo->conf_idev->commonOptions =
- xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", path);
+ pInfo->options =
+ xf86AddNewOption(pInfo->options, "Device", path);
xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n", pInfo->name,
path);
diff --git a/src/lnx_mouse.c b/src/lnx_mouse.c
index 914b941..32b83b7 100644
--- a/src/lnx_mouse.c
+++ b/src/lnx_mouse.c
@@ -80,8 +80,8 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
if (*pdev) {
close(fd);
/* Set the Device option. */
- pInfo->conf_idev->commonOptions =
- xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", *pdev);
+ pInfo->options =
+ xf86AddNewOption(pInfo->options, "Device", *pdev);
xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
pInfo->name, *pdev);
}
@@ -99,7 +99,7 @@ lnxMouseMagic(InputInfoPtr pInfo)
int i;
int proto = MOUSE_PROTO_UNKNOWN;
- dev = xf86SetStrOption(pInfo->conf_idev->commonOptions, "Device", NULL);
+ dev = xf86SetStrOption(pInfo->options, "Device", NULL);
if (!dev) {
#ifdef DEBUG
ErrorF("xf86SetStrOption failed to return the device name\n");
diff --git a/src/mouse.c b/src/mouse.c
index fb9ccc8..e600474 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -923,7 +923,11 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
pMse->autoProbe = FALSE;
/* Collect the options, and process the common options. */
- xf86CollectInputOptions(pInfo, pProto->defaults, NULL);
+ /* need some special handling here. xf86CollectInputOptions will reset
+ * pInfo->options if the second argument is not-null. To re-merge the
+ * previously set arguments, pass the original pInfo->options in.
+ */
+ xf86CollectInputOptions(pInfo, pProto->defaults, pInfo->options);
xf86ProcessCommonOptions(pInfo, pInfo->options);
/* Check if the device can be opened. */
diff --git a/src/sun_mouse.c b/src/sun_mouse.c
index 4749f88..95b45bc 100644
--- a/src/sun_mouse.c
+++ b/src/sun_mouse.c
@@ -259,8 +259,8 @@ vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
if (buttons == 0) {
SYSCALL(i = ioctl(pInfo->fd, MSIOBUTTONS, &buttons));
if (i == 0) {
- pInfo->conf_idev->commonOptions =
- xf86ReplaceIntOption(pInfo->conf_idev->commonOptions,
+ pInfo->options =
+ xf86ReplaceIntOption(pInfo->options,
"Buttons", buttons);
xf86Msg(X_INFO, "%s: Setting Buttons option to \"%d\"\n",
pInfo->name, buttons);
@@ -676,16 +676,14 @@ solarisMouseAutoProbe(InputInfoPtr pInfo, const char **protocol,
/* Check to see if xorg.conf or HAL specified a device to use */
*device = xf86CheckStrOption(pInfo->options, "Device", NULL);
if (*device == NULL) {
- *device = xf86CheckStrOption(pInfo->conf_idev->commonOptions,
- "Device", NULL);
+ *device = xf86CheckStrOption(pInfo->options, "Device", NULL);
}
}
if (*device != NULL) {
strmod = xf86CheckStrOption(pInfo->options, "StreamsModule", NULL);
if (strmod == NULL) {
- strmod = xf86CheckStrOption(pInfo->conf_idev->commonOptions,
- "StreamsModule", NULL);
+ strmod = xf86CheckStrOption(pInfo->options, "StreamsModule", NULL);
}
if (strmod) {
/* if a device name is already known, and a StreamsModule is
@@ -744,13 +742,13 @@ SetupAuto(InputInfoPtr pInfo, int *protoPara)
/* probe to find device/protocol to use */
if (solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) {
/* Set the Device option. */
- pInfo->conf_idev->commonOptions =
- xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", pdev);
+ pInfo->options =
+ xf86AddNewOption(pInfo->options, "Device", pdev);
xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
pInfo->name, pdev);
}
} else if (pMse->protocolID == PROT_AUTO) {
- pdev = xf86CheckStrOption(pInfo->conf_idev->commonOptions,
+ pdev = xf86CheckStrOption(pInfo->options,
"Device", NULL);
solarisMouseAutoProbe(pInfo, &pproto, &pdev);
}
@@ -765,8 +763,8 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
if (solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) {
/* Set the Device option. */
- pInfo->conf_idev->commonOptions =
- xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", pdev);
+ pInfo->options =
+ xf86AddNewOption(pInfo->options, "Device", pdev);
xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
pInfo->name, pdev);
}
commit f3f405db5603ecca5bc14dba23628ea56a0f5202
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Oct 25 16:08:49 2010 +1000
Remove write-only field mouseFlags.
The flags were used to store ClearDTS and ClearRTR, but those options only
resulted in log messages.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
diff --git a/src/mouse.c b/src/mouse.c
index 19ad8bc..fb9ccc8 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -660,29 +660,8 @@ static void
MouseSerialOptions(InputInfoPtr pInfo)
{
MouseDevPtr pMse = pInfo->private;
- Bool clearDTR, clearRTS;
-
-
+
pMse->baudRate = xf86SetIntOption(pInfo->options, "BaudRate", 0);
- if ((clearDTR = xf86SetBoolOption(pInfo->options, "ClearDTR",FALSE)))
- pMse->mouseFlags |= MF_CLEAR_DTR;
-
-
- if ((clearRTS = xf86SetBoolOption(pInfo->options, "ClearRTS",FALSE)))
- pMse->mouseFlags |= MF_CLEAR_RTS;
-
- if (clearDTR || clearRTS) {
- xf86Msg(X_CONFIG, "%s: ", pInfo->name);
- if (clearDTR) {
- xf86ErrorF("ClearDTR");
- if (clearRTS)
- xf86ErrorF(", ");
- }
- if (clearRTS) {
- xf86ErrorF("ClearRTS");
- }
- xf86ErrorF("\n");
- }
}
static MouseProtocolID
diff --git a/src/mouse.h b/src/mouse.h
index 51741fc..8c02ba1 100644
--- a/src/mouse.h
+++ b/src/mouse.h
@@ -211,8 +211,6 @@ typedef struct _MouseDevRec {
Bool flipXY;
int invX;
int invY;
- int mouseFlags; /* Flags to Clear after opening
- * mouse dev */
int resolution;
int negativeZ; /* button mask */
int positiveZ; /* button mask */
commit 23308a251e16c4a6ab3c89c0505b0d8900c9cdff
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Oct 25 13:51:59 2010 +1000
Rename xf86OSMouseInit to OSMouseInit.
This isn't a DDX function anymore.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c
index ea13efe..e288f38 100644
--- a/src/bsd_mouse.c
+++ b/src/bsd_mouse.c
@@ -768,8 +768,8 @@ bsdMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags)
return TRUE;
}
-_X_EXPORT OSMouseInfoPtr
-xf86OSMouseInit(int flags)
+OSMouseInfoPtr
+OSMouseInit(int flags)
{
OSMouseInfoPtr p;
diff --git a/src/hurd_mouse.c b/src/hurd_mouse.c
index edc46f8..45b3cf2 100644
--- a/src/hurd_mouse.c
+++ b/src/hurd_mouse.c
@@ -227,7 +227,7 @@ DefaultProtocol(void)
}
OSMouseInfoPtr
-xf86OSMouseInit(int flags)
+OSMouseInit(int flags)
{
OSMouseInfoPtr p;
diff --git a/src/lnx_mouse.c b/src/lnx_mouse.c
index 7d041d2..914b941 100644
--- a/src/lnx_mouse.c
+++ b/src/lnx_mouse.c
@@ -204,8 +204,8 @@ SetupAuto(InputInfoPtr pInfo, int *protoPara)
return lnxMouseMagic(pInfo);
}
-_X_EXPORT OSMouseInfoPtr
-xf86OSMouseInit(int flags)
+OSMouseInfoPtr
+OSMouseInit(int flags)
{
OSMouseInfoPtr p;
diff --git a/src/mouse.c b/src/mouse.c
index 0ffd1b7..19ad8bc 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -764,7 +764,7 @@ InitProtocols(void)
if (osInfo)
return TRUE;
- osInfo = xf86OSMouseInit(0);
+ osInfo = OSMouseInit(0);
if (!osInfo)
return FALSE;
if (!osInfo->SupportedInterfaces)
diff --git a/src/mouse.h b/src/mouse.h
index 22ec0e3..51741fc 100644
--- a/src/mouse.h
+++ b/src/mouse.h
@@ -159,7 +159,7 @@ typedef struct {
* failed.
*/
-extern OSMouseInfoPtr xf86OSMouseInit(int flags);
+extern OSMouseInfoPtr OSMouseInit(int flags);
/* Z axis mapping */
#define MSE_NOZMAP 0
diff --git a/src/sun_mouse.c b/src/sun_mouse.c
index 0d4e93b..4749f88 100644
--- a/src/sun_mouse.c
+++ b/src/sun_mouse.c
@@ -780,8 +780,8 @@ SupportedInterfaces(void)
return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO | MSE_XPS2 | MSE_MISC;
}
-_X_EXPORT OSMouseInfoPtr
-xf86OSMouseInit(int flags)
+OSMouseInfoPtr
+OSMouseInit(int flags)
{
OSMouseInfoPtr p;
commit 9263c949df6cbbb8e42ec4f0d6337206f684d0f5
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Oct 25 13:49:23 2010 +1000
Remove random History comment.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
diff --git a/src/mouse.h b/src/mouse.h
index 6628001..22ec0e3 100644
--- a/src/mouse.h
+++ b/src/mouse.h
@@ -161,17 +161,6 @@ typedef struct {
extern OSMouseInfoPtr xf86OSMouseInit(int flags);
-/* Adjust this when the mouse interface changes. */
-
-/*
- * History:
- *
- * 1.0.0 - Everything up to when versioning was started.
- * 1.1.0 - FindDevice and GuessProtocol added to OSMouseInfoRec
- * 1.2.0 - xisbscale added to MouseDevRec
- *
- */
-
/* Z axis mapping */
#define MSE_NOZMAP 0
#define MSE_MAPTOX -1
commit ecc3d28fa488f186896d714b8872b8875f8eccfd
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Oct 25 13:46:13 2010 +1000
Rename xf86OSmouse.h to mouse.h
The driver-internal mouse.h header was only an include command for
xf86OSmouse.h anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
diff --git a/src/Makefile.am b/src/Makefile.am
index 0857c98..927d530 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -39,7 +39,6 @@ OS_SRCS = bsd_mouse.c hurd_mouse.c lnx_mouse.c sun_mouse.c
mouse.h \
pnp.c \
mousePriv.h \
- xf86OSmouse.h \
@OS_MOUSE_NAME@_mouse.c
EXTRA_DIST = $(OS_SRCS)
diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c
index a519cdb..ea13efe 100644
--- a/src/bsd_mouse.c
+++ b/src/bsd_mouse.c
@@ -33,7 +33,7 @@
#include "xf86Priv.h"
#include "xf86_OSlib.h"
#include "xf86Xinput.h"
-#include "xf86OSmouse.h"
+#include "mouse.h"
#include "xisb.h"
#include "mipointer.h"
#ifdef WSCONS_SUPPORT
diff --git a/src/hurd_mouse.c b/src/hurd_mouse.c
index 2d6970f..edc46f8 100644
--- a/src/hurd_mouse.c
+++ b/src/hurd_mouse.c
@@ -34,7 +34,7 @@
#include "xf86.h"
#include "xf86Xinput.h"
-#include "xf86OSmouse.h"
+#include "mouse.h"
Reply to: