xserver-xorg-input-vmmouse: Changes to 'debian-experimental'
ChangeLog | 160 +++++++++++++++++++++++++++++++++
configure.ac | 13 +-
debian/changelog | 7 +
debian/control | 2
fdi/11-x11-vmmouse.fdi | 2
man/Makefile.am | 21 ----
src/vmmouse.c | 235 ++++++++++++++++++++++++++++++++++++-------------
tools/Makefile.am | 4
8 files changed, 354 insertions(+), 90 deletions(-)
New commits:
commit ebe2b6577a1e0ecbad07c434d8ad39f7107ab423
Author: Cyril Brulebois <kibi@debian.org>
Date: Wed Jan 5 01:57:30 2011 +0100
Upload to experimental.
diff --git a/debian/changelog b/debian/changelog
index 003c0cf..a4c542f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-xserver-xorg-input-vmmouse (1:12.6.99.901-1) UNRELEASED; urgency=low
+xserver-xorg-input-vmmouse (1:12.6.99.901-1) experimental; urgency=low
* New upstream release candidate.
* Bump xutils-dev build-dep for new macros.
- -- Cyril Brulebois <kibi@debian.org> Wed, 05 Jan 2011 01:51:36 +0100
+ -- Cyril Brulebois <kibi@debian.org> Wed, 05 Jan 2011 01:57:21 +0100
xserver-xorg-input-vmmouse (1:12.6.10-1) experimental; urgency=low
commit 6bb74a32a85c41bf13af6e44350e6ff6fd744187
Author: Cyril Brulebois <kibi@debian.org>
Date: Wed Jan 5 01:57:13 2011 +0100
Bump xutils-dev build-dep for new macros.
diff --git a/debian/changelog b/debian/changelog
index f96e9ec..003c0cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
xserver-xorg-input-vmmouse (1:12.6.99.901-1) UNRELEASED; urgency=low
* New upstream release candidate.
+ * Bump xutils-dev build-dep for new macros.
-- Cyril Brulebois <kibi@debian.org> Wed, 05 Jan 2011 01:51:36 +0100
diff --git a/debian/control b/debian/control
index bf0866d..ce99e60 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@ Build-Depends:
dpkg-dev (>= 1.14.17),
automake,
libtool,
- xutils-dev (>= 1:7.5+1)
+ xutils-dev (>= 1:7.5+4),
Standards-Version: 3.8.4
Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-input-vmmouse
Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-input-vmmouse.git
commit d17e6dbdcf56f11a6ed77c30154523da28506d6c
Author: Cyril Brulebois <kibi@debian.org>
Date: Wed Jan 5 01:52:30 2011 +0100
Bump changelogs.
diff --git a/ChangeLog b/ChangeLog
index bda91b0..1f3e616 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,163 @@
+commit 07232feb6b5acc5c25e9cdf12b804397ca52dbce
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date: Wed Dec 8 10:07:20 2010 +0100
+
+ vmmouse 12.6.99.901
+
+ Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 5d0ba2e03718b73013519fc0a1c74f2ef5f4e7ad
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date: Wed Dec 1 10:04:01 2010 +0100
+
+ Make the .fdi script work on solaris
+
+ Solaris doesn't use the same HAL device naming as Linux.
+ Use the common part of the device name.
+
+ Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit e5987a4e60d4e05159c7cc4a24cee6daed36c770
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date: Thu Nov 4 09:09:52 2010 +0100
+
+ Make the modinfo sring contain an optional subpatch number
+
+ The idea is that the build system assigns this number if needed.
+ As an example it might be the commit number since the last version tag.
+
+ Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 3ef519e91fb85261834a3f4ff6982c0a9f86d616
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Nov 2 09:23:10 2010 +1000
+
+ Adjust to input ABI 12.
+
+ New PreInit prototype that requires reshuffling.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 3d97fa1c3a5404ae02ed67eb94a5519394ba2bf5
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Nov 2 09:23:41 2010 +1000
+
+ Move allocation of mPriv down.
+
+ No functional change. If we get to this point, we know it's available.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 4e08974ead62fc50ebbe0190abce78c5de3fcdff
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Nov 2 09:04:45 2010 +1000
+
+ ABI 12 requires valuator modes to be specified.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 4527ef863a4c4d3e499007abb65dbb5e086219e8
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Oct 26 10:43:42 2010 +1000
+
+ Move passthrough initialization out into a separate function.
+
+ No functional changes, just modularising a bit to make future changes
+ easier.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 6561d57d4cc8ba5a68c4f333a48eb2f9f131be7b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Oct 26 10:38:57 2010 +1000
+
+ Remove superflouous assignment.
+
+ mPriv is freed a few lines down, assigning anything here makes no
+ difference.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 4345af5cacec0501a045a303ff9816098b0d63d0
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Oct 26 10:16:28 2010 +1000
+
+ Replace LocalDevicePtr with InputInfoPtr.
+
+ The LocalDevicePtr define was removed from the server with ABI 12, but
+ InputInfoPtr has been an alias for it since the Xfree86/Xorg fork.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 8962e5c7c521e6cf28f464a9cdb80bd37f2f4328
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Tue Oct 19 20:20:01 2010 -0400
+
+ make: remove duplicate definition of EXTRA_DIST
+
+ autoreconf -vfi produces this output:
+ tools/Makefile.am:59: EXTRA_DIST multiply defined in condition TRUE ...
+ tools/Makefile.am:36: ... `EXTRA_DIST' previously defined here
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+ Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit d060a173af59cfde74aa5aa9a59557f509022421
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Tue Oct 19 20:20:02 2010 -0400
+
+ config: upgrade to util-macros 1.8 for additional man page support
+
+ Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+ The value of MAN_SUBST is the same for all X.Org packages.
+
+ Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+ Use the appropriate platform version of sed
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+ Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 61944e4497a65370716fa067f4b6a8643d089a24
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Tue Oct 19 20:20:03 2010 -0400
+
+ tools make: use Autoconf provided $(AM_V_GEN)$(SED)
+
+ Enables silent rule and use platform appropriate version of sed.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+ Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 3b290e278b3721bef01ecc8ebc04a9a2992f7558
+Author: Trevor Woerner <twoerner@gmail.com>
+Date: Tue Oct 19 15:10:45 2010 -0400
+
+ InputDriverRec XINPUT cleanup.
+
+ ABI version 11 of the InputDriverRec data structure no longer
+ includes the refCount member.
+
+ Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+ Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 8650db94573e73953ba9718a2cc2644b38adc306
+Author: Trevor Woerner <twoerner@gmail.com>
+Date: Tue Oct 19 15:09:55 2010 -0400
+
+ Deprecated code cleanup.
+
+ Replace calls to deprecated dynamic memory wrapper functions
+ in driver code.
+
+ Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+ Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
+
commit adc177e3af9dc5da982ceb7a93e9c5e3bc6aed59
Author: Adam Jackson <ajax@redhat.com>
Date: Tue Aug 10 10:36:33 2010 -0400
diff --git a/debian/changelog b/debian/changelog
index e052b93..f96e9ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-input-vmmouse (1:12.6.99.901-1) UNRELEASED; urgency=low
+
+ * New upstream release candidate.
+
+ -- Cyril Brulebois <kibi@debian.org> Wed, 05 Jan 2011 01:51:36 +0100
+
xserver-xorg-input-vmmouse (1:12.6.10-1) experimental; urgency=low
[ Robert Hooker ]
commit 07232feb6b5acc5c25e9cdf12b804397ca52dbce
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date: Wed Dec 8 10:07:20 2010 +0100
vmmouse 12.6.99.901
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/configure.ac b/configure.ac
index 9d42e24..73d0164 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-input-vmmouse],
- 12.6.10,
+ [12.6.99.901],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-input-vmmouse)
commit 5d0ba2e03718b73013519fc0a1c74f2ef5f4e7ad
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date: Wed Dec 1 10:04:01 2010 +0100
Make the .fdi script work on solaris
Solaris doesn't use the same HAL device naming as Linux.
Use the common part of the device name.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/fdi/11-x11-vmmouse.fdi b/fdi/11-x11-vmmouse.fdi
index e725f9a..6151196 100644
--- a/fdi/11-x11-vmmouse.fdi
+++ b/fdi/11-x11-vmmouse.fdi
@@ -2,7 +2,7 @@
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.mouse">
- <match key="input.originating_device" contains="i8042_AUX_port">
+ <match key="input.originating_device" contains="i8042_">
<append key="info.callouts.add" type="strlist">hal-probe-vmmouse</append>
</match>
</match>
commit e5987a4e60d4e05159c7cc4a24cee6daed36c770
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date: Thu Nov 4 09:09:52 2010 +0100
Make the modinfo sring contain an optional subpatch number
The idea is that the build system assigns this number if needed.
As an example it might be the commit number since the last version tag.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/src/vmmouse.c b/src/vmmouse.c
index e70d95e..ad014ec 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -110,12 +110,18 @@
/*
* Standard four digit version string expected by VMware Tools installer.
- * As the driver's version is only {major, minor, patchlevel}, simply append an
- * extra zero for the fourth digit.
+ * As the driver's version is only {major, minor, patchlevel},
+ * The fourth digit may describe the commit number relative to the
+ * last version tag as output from `git describe`
*/
#ifdef __GNUC__
+#ifdef VMW_SUBPATCH
+const char vm_mouse_version[] __attribute__((section(".modinfo"),unused)) =
+ "version=" VMMOUSE_DRIVER_VERSION_STRING "." VMW_STRING(VMW_SUBPATCH);
+#else
const char vm_mouse_version[] __attribute__((section(".modinfo"),unused)) =
"version=" VMMOUSE_DRIVER_VERSION_STRING ".0";
+#endif /*VMW_SUBPATCH*/
#endif
commit 3ef519e91fb85261834a3f4ff6982c0a9f86d616
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Nov 2 09:23:10 2010 +1000
Adjust to input ABI 12.
New PreInit prototype that requires reshuffling.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/src/vmmouse.c b/src/vmmouse.c
index 9d366e2..e70d95e 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -122,19 +122,23 @@ const char vm_mouse_version[] __attribute__((section(".modinfo"),unused)) =
/*****************************************************************************
* static function header
****************************************************************************/
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+static int VMMousePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
+#else
static InputInfoPtr VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags);
+static void VMMouseCloseProc(InputInfoPtr pInfo);
+static Bool VMMouseConvertProc(InputInfoPtr pInfo, int first, int num, int v0, int v1, int v2,
+ int v3, int v4, int v5, int *x, int *y);
+#endif
static void VMMouseUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
static void MouseCommonOptions(InputInfoPtr pInfo);
static void GetVMMouseMotionEvent(InputInfoPtr pInfo);
static void VMMousePostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy, int dz, int dw);
static void VMMouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy);
static Bool VMMouseDeviceControl(DeviceIntPtr device, int mode);
-static void VMMouseCloseProc(InputInfoPtr pInfo);
static int VMMouseControlProc(InputInfoPtr pInfo, xDeviceCtl * control);
static void VMMouseReadInput(InputInfoPtr pInfo);
static int VMMouseSwitchMode(ClientPtr client, DeviceIntPtr dev, int mode);
-static Bool VMMouseConvertProc(InputInfoPtr pInfo, int first, int num, int v0, int v1, int v2,
- int v3, int v4, int v5, int *x, int *y);
static void MouseCtrl(DeviceIntPtr device, PtrCtrl *ctrl);
/******************************************************************************
@@ -217,6 +221,44 @@ static char reverseMap[32] = { 0, 4, 2, 6, 1, 5, 3, 7,
#define reverseBits(map, b) (((b) & ~0x0f) | map[(b) & 0x0f])
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+static int
+VMMouseInitPassthru(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+{
+ InputAttributes *attrs = NULL;
+ InputOption *input_options = NULL, *tmp, *opts;
+ pointer options;
+ DeviceIntPtr dev;
+ int rc;
+
+ options = xf86OptionListDuplicate(pInfo->options);
+ options = xf86ReplaceStrOption(options, "Driver", "mouse");
+
+ while(options) {
+ tmp = calloc(1, sizeof(InputOption));
+ tmp->key = xf86OptionName(options);
+ tmp->value = xf86OptionValue(options);
+ tmp->next = input_options;
+ input_options = tmp;
+ options = xf86NextOption(options);
+ }
+
+ rc = NewInputDeviceRequest(input_options, attrs, &dev);
+
+ opts = input_options;
+ tmp = opts;
+ while(opts) {
+ tmp = opts->next;
+ free(opts->key);
+ free(opts->value);
+ free(opts);
+ opts = tmp;
+ }
+
+ return rc;
+}
+
+#else /* if ABI_XINPUT_VERSION < 12 */
static InputInfoPtr
VMMouseInitPassthru(InputDriverPtr drv, IDevPtr dev, int flags)
{
@@ -228,6 +270,7 @@ VMMouseInitPassthru(InputDriverPtr drv, IDevPtr dev, int flags)
return NULL;
}
}
+#endif
/*
*----------------------------------------------------------------------
@@ -248,12 +291,14 @@ VMMouseInitPassthru(InputDriverPtr drv, IDevPtr dev, int flags)
*----------------------------------------------------------------------
*/
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
+static int
+VMMouseNewPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
+
static InputInfoPtr
VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
{
InputInfoPtr pInfo;
- MouseDevPtr pMse;
- VMMousePrivPtr mPriv;
#ifndef NO_MOUSE_MODULE
{
@@ -294,40 +339,74 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
return NULL;
}
+ pInfo->name = dev->identifier;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
+ pInfo->motion_history_proc = xf86GetMotionEvents;
+#endif
+ pInfo->close_proc = VMMouseCloseProc;
+ pInfo->conversion_proc = VMMouseConvertProc;
+ pInfo->reverse_conversion_proc = NULL;
+ pInfo->fd = -1;
+ pInfo->dev = NULL;
+ pInfo->private_flags = 0;
+ pInfo->always_core_feedback = 0;
+ pInfo->conf_idev = dev;
+ pInfo->flags = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS;
+
+ /* Collect the options, and process the common options. */
+ xf86CollectInputOptions(pInfo, NULL, NULL);
+ xf86ProcessCommonOptions(pInfo, pInfo->options);
+
+ if (VMMouseNewPreInit(drv, pInfo, flags) == Success)
+ pInfo->flags |= XI86_CONFIGURED;
+
+ return pInfo;
+}
+
+static int
+VMMouseNewPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+#else /* if ABI_XINPUT_VERSION >= 12 */
+static int
+VMMousePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+#endif
+{
+ MouseDevPtr pMse = NULL;
+ VMMousePrivPtr mPriv = NULL;
+ int rc = Success;
+
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ /* For ABI < 12, we need to return the wrapped driver's pInfo (see
+ * above). ABI 12, we call NIDR and are done */
+ if (!VMMouseClient_Enable()) {
+ xf86Msg(X_ERROR, "VMWARE(0): vmmouse enable failed\n");
+ return VMMouseInitPassthru(drv, pInfo, flags);
+ } else {
+ xf86Msg(X_INFO, "VMWARE(0): vmmouse is available\n");
+ VMMouseClient_Disable();
+ }
+#endif
+
mPriv = calloc (1, sizeof (VMMousePrivRec));
if (!mPriv) {
- xf86DeleteInput(pInfo, 0);
- return NULL;
+ rc = BadAlloc;
+ goto error;
}
mPriv->absoluteRequested = FALSE;
mPriv->vmmouseAvailable = TRUE;
/* Settup the pInfo */
- pInfo->name = dev->identifier;
pInfo->type_name = XI_MOUSE;
- pInfo->flags = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS;
pInfo->device_control = VMMouseDeviceControl;
pInfo->read_input = VMMouseReadInput;
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
- pInfo->motion_history_proc = xf86GetMotionEvents;
-#endif
pInfo->control_proc = VMMouseControlProc;
- pInfo->close_proc = VMMouseCloseProc;
pInfo->switch_mode = VMMouseSwitchMode;
- pInfo->conversion_proc = VMMouseConvertProc;
- pInfo->reverse_conversion_proc = NULL;
- pInfo->fd = -1;
- pInfo->dev = NULL;
- pInfo->private_flags = 0;
- pInfo->always_core_feedback = 0;
- pInfo->conf_idev = dev;
/* Allocate the MouseDevRec and initialise it. */
if (!(pMse = calloc(sizeof(MouseDevRec), 1))) {
- free(mPriv);
- return pInfo;
+ rc = BadAlloc;
+ goto error;
}
pInfo->private = pMse;
@@ -337,10 +416,6 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
pMse->mousePriv = mPriv;
- /* Collect the options, and process the common options. */
- xf86CollectInputOptions(pInfo, NULL, NULL);
- xf86ProcessCommonOptions(pInfo, pInfo->options);
-
/* Check if the device can be opened. */
pInfo->fd = xf86OpenSerial(pInfo->options);
if (pInfo->fd == -1) {
@@ -348,11 +423,8 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name);
else {
xf86Msg(X_ERROR, "%s: cannot open input device\n", pInfo->name);
- if (pMse->mousePriv)
- free(pMse->mousePriv);
- free(pMse);
- pInfo->private = NULL;
- return pInfo;
+ rc = BadValue;
+ goto error;
}
}
xf86CloseSerial(pInfo->fd);
@@ -364,8 +436,16 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
/* set up the current screen num */
mPriv->screenNum = xf86SetIntOption(pInfo->options, "ScreenNumber", 0);
- pInfo->flags |= XI86_CONFIGURED;
- return pInfo;
+ return Success;
+
+error:
+ pInfo->private = NULL;
+ if (mPriv)
+ free(mPriv);
+ if (pMse)
+ free(pMse);
+
+ return rc;
}
@@ -1072,11 +1152,13 @@ VMMouseControlProc(InputInfoPtr pInfo, xDeviceCtl * control)
*----------------------------------------------------------------------
*/
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
static void
VMMouseCloseProc(InputInfoPtr pInfo)
{
xf86Msg(X_INFO, "VMWARE(0): VMMouseCloseProc\n");
}
+#endif
/*
@@ -1117,6 +1199,7 @@ VMMouseSwitchMode(ClientPtr client, DeviceIntPtr dev, int mode)
*----------------------------------------------------------------------
*/
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
static Bool
VMMouseConvertProc(InputInfoPtr pInfo, int first, int num, int v0, int v1, int v2,
int v3, int v4, int v5, int *x, int *y)
@@ -1147,6 +1230,7 @@ VMMouseConvertProc(InputInfoPtr pInfo, int first, int num, int v0, int v1, int v
}
return TRUE;
}
+#endif
#ifdef XFree86LOADER
commit 3d97fa1c3a5404ae02ed67eb94a5519394ba2bf5
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Nov 2 09:23:41 2010 +1000
Move allocation of mPriv down.
No functional change. If we get to this point, we know it's available.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/src/vmmouse.c b/src/vmmouse.c
index 32abd9e..9d366e2 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -268,15 +268,6 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
}
#endif
- mPriv = calloc (1, sizeof (VMMousePrivRec));
-
-
- if (!mPriv) {
- return NULL;
- }
-
- mPriv->absoluteRequested = FALSE;
-
/*
* try to enable vmmouse here
*/
@@ -286,13 +277,11 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
* Fall back to normal mouse module
*/
xf86Msg(X_ERROR, "VMWARE(0): vmmouse enable failed\n");
- free(mPriv);
return VMMouseInitPassthru(drv, dev, flags);
} else {
/*
* vmmouse is available
*/
- mPriv->vmmouseAvailable = TRUE;
xf86Msg(X_INFO, "VMWARE(0): vmmouse is available\n");
/*
* Disable the absolute pointing device for now
@@ -302,10 +291,19 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
}
if (!(pInfo = xf86AllocateInput(drv, 0))) {
- free(mPriv);
return NULL;
}
+ mPriv = calloc (1, sizeof (VMMousePrivRec));
+
+ if (!mPriv) {
+ xf86DeleteInput(pInfo, 0);
+ return NULL;
+ }
+
+ mPriv->absoluteRequested = FALSE;
+ mPriv->vmmouseAvailable = TRUE;
+
/* Settup the pInfo */
pInfo->name = dev->identifier;
pInfo->type_name = XI_MOUSE;
commit 4e08974ead62fc50ebbe0190abce78c5de3fcdff
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Nov 2 09:04:45 2010 +1000
ABI 12 requires valuator modes to be specified.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/src/vmmouse.c b/src/vmmouse.c
index 86f1ccf..32abd9e 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -787,13 +787,21 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
axes_labels[0],
#endif
- 0, 65535, 10000, 0, 10000);
+ 0, 65535, 10000, 0, 10000
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
#else
xf86InitValuatorAxisStruct(device, 0,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
axes_labels[0],
#endif
- 0, -1, 1, 0, 1);
+ 0, -1, 1, 0, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Relative
+#endif
+ );
#endif
xf86InitValuatorDefaults(device, 0);
/* Y valuator */
@@ -802,13 +810,21 @@ VMMouseDeviceControl(DeviceIntPtr device, int mode)
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
axes_labels[1],
#endif
- 0, 65535, 10000, 0, 10000);
+ 0, 65535, 10000, 0, 10000
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Absolute
+#endif
+ );
#else
xf86InitValuatorAxisStruct(device, 1,
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
axes_labels[1],
#endif
- 0, -1, 1, 0, 1);
+ 0, -1, 1, 0, 1
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
+ , Relative
+#endif
+ );
#endif
xf86InitValuatorDefaults(device, 1);
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
commit 4527ef863a4c4d3e499007abb65dbb5e086219e8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Oct 26 10:43:42 2010 +1000
Move passthrough initialization out into a separate function.
No functional changes, just modularising a bit to make future changes
easier.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/src/vmmouse.c b/src/vmmouse.c
index 00960cc..86f1ccf 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -217,6 +217,17 @@ static char reverseMap[32] = { 0, 4, 2, 6, 1, 5, 3, 7,
#define reverseBits(map, b) (((b) & ~0x0f) | map[(b) & 0x0f])
+static InputInfoPtr
+VMMouseInitPassthru(InputDriverPtr drv, IDevPtr dev, int flags)
+{
+ InputDriverRec *passthruMouse;
+ passthruMouse = (InputDriverRec *)LoaderSymbol("MOUSE");
+ if(passthruMouse != NULL) {
+ return (passthruMouse->PreInit)(drv, dev, flags);
+ } else {
+ return NULL;
+ }
+}
/*
*----------------------------------------------------------------------
@@ -274,16 +285,9 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
* vmmouse failed
* Fall back to normal mouse module
*/
- InputDriverRec *passthruMouse;
xf86Msg(X_ERROR, "VMWARE(0): vmmouse enable failed\n");
- passthruMouse = (InputDriverRec *)LoaderSymbol("MOUSE");
free(mPriv);
- if(passthruMouse != NULL){
- return (passthruMouse->PreInit)(drv, dev, flags);
- } else {
- return NULL;
- }
-
+ return VMMouseInitPassthru(drv, dev, flags);
} else {
/*
* vmmouse is available
commit 6561d57d4cc8ba5a68c4f333a48eb2f9f131be7b
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Oct 26 10:38:57 2010 +1000
Remove superflouous assignment.
mPriv is freed a few lines down, assigning anything here makes no
difference.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/src/vmmouse.c b/src/vmmouse.c
index 59e7be7..00960cc 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -276,7 +276,6 @@ VMMousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
*/
InputDriverRec *passthruMouse;
xf86Msg(X_ERROR, "VMWARE(0): vmmouse enable failed\n");
- mPriv->vmmouseAvailable = FALSE;
passthruMouse = (InputDriverRec *)LoaderSymbol("MOUSE");
free(mPriv);
if(passthruMouse != NULL){
commit 4345af5cacec0501a045a303ff9816098b0d63d0
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Oct 26 10:16:28 2010 +1000
Replace LocalDevicePtr with InputInfoPtr.
The LocalDevicePtr define was removed from the server with ABI 12, but
InputInfoPtr has been an alias for it since the Xfree86/Xorg fork.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/src/vmmouse.c b/src/vmmouse.c
index b716f46..59e7be7 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -129,8 +129,8 @@ static void GetVMMouseMotionEvent(InputInfoPtr pInfo);
static void VMMousePostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy, int dz, int dw);
static void VMMouseDoPostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy);
static Bool VMMouseDeviceControl(DeviceIntPtr device, int mode);
-static void VMMouseCloseProc(LocalDevicePtr local);
-static int VMMouseControlProc(LocalDevicePtr local, xDeviceCtl * control);
+static void VMMouseCloseProc(InputInfoPtr pInfo);
+static int VMMouseControlProc(InputInfoPtr pInfo, xDeviceCtl * control);
static void VMMouseReadInput(InputInfoPtr pInfo);
static int VMMouseSwitchMode(ClientPtr client, DeviceIntPtr dev, int mode);
static Bool VMMouseConvertProc(InputInfoPtr pInfo, int first, int num, int v0, int v1, int v2,
@@ -686,7 +686,7 @@ MouseCommonOptions(InputInfoPtr pInfo)
*/
static void
-VMMouseUnInit(InputDriverPtr drv, LocalDevicePtr local, int flags)
+VMMouseUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
{
xf86Msg(X_INFO, "VMWARE(0): VMMouseUnInit\n");
}
@@ -1033,7 +1033,7 @@ GetVMMouseMotionEvent(InputInfoPtr pInfo){
*/
static int
-VMMouseControlProc(LocalDevicePtr local, xDeviceCtl * control)
+VMMouseControlProc(InputInfoPtr pInfo, xDeviceCtl * control)
{
xf86Msg(X_INFO, "VMWARE(0): VMMouseControlProc\n");
return (Success);
@@ -1056,7 +1056,7 @@ VMMouseControlProc(LocalDevicePtr local, xDeviceCtl * control)
*/
static void
-VMMouseCloseProc(LocalDevicePtr local)
+VMMouseCloseProc(InputInfoPtr pInfo)
{
xf86Msg(X_INFO, "VMWARE(0): VMMouseCloseProc\n");
}
commit 8962e5c7c521e6cf28f464a9cdb80bd37f2f4328
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Tue Oct 19 20:20:01 2010 -0400
make: remove duplicate definition of EXTRA_DIST
autoreconf -vfi produces this output:
tools/Makefile.am:59: EXTRA_DIST multiply defined in condition TRUE ...
tools/Makefile.am:36: ... `EXTRA_DIST' previously defined here
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/tools/Makefile.am b/tools/Makefile.am
index bdac913..23493cd 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -33,8 +33,6 @@ hal-probe-vmmouse: hal-probe-vmmouse.in
-e 's|__HAL_BIN_PREFIX__|$(HAL_BIN_DIR)|g' \
< $< > $@
-EXTRA_DIST = hal-probe-vmmouse.in
-
CLEANFILES = hal-probe-vmmouse
if HAS_XORG_CONF_DIR
commit d060a173af59cfde74aa5aa9a59557f509022421
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Tue Oct 19 20:20:02 2010 -0400
config: upgrade to util-macros 1.8 for additional man page support
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
The value of MAN_SUBST is the same for all X.Org packages.
Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
Use the appropriate platform version of sed
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/configure.ac b/configure.ac
index d5b89c6..9d42e24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,10 +32,10 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
m4_ifndef([XORG_MACROS_VERSION],
- [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.4)
+ [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
DRIVER_NAME=vmmouse
@@ -47,7 +47,6 @@ AM_CONFIG_HEADER([config.h])
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_PROG_CC
-AC_PROG_SED
AH_TOP([#include "xorg-server.h"])
diff --git a/man/Makefile.am b/man/Makefile.am
index d59d374..42ef841 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -22,9 +22,7 @@
#
drivermandir = $(DRIVER_MAN_DIR)
-
driverman_PRE = @DRIVER_NAME@.man
-
driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
appmandir = $(APP_MAN_DIR)
@@ -32,27 +30,10 @@ appman_PRE = @DRIVER_NAME@_detect.man
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
EXTRA_DIST = @DRIVER_NAME@.man $(appman_PRE)
-
CLEANFILES = $(driverman_DATA) $(appman_DATA)
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
- XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
- -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
- -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
- -e 's|__xservername__|Xorg|g' \
- -e 's|__xconfigfile__|xorg.conf|g' \
- -e 's|__projectroot__|$(prefix)|g' \
- -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
- -e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \
- -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
- -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
- -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
.man.$(DRIVER_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
.man.$(APP_MAN_SUFFIX):
commit 61944e4497a65370716fa067f4b6a8643d089a24
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Tue Oct 19 20:20:03 2010 -0400
tools make: use Autoconf provided $(AM_V_GEN)$(SED)
Enables silent rule and use platform appropriate version of sed.
Reply to: