xserver-xorg-input-mutouch: Changes to 'debian-unstable'
ChangeLog | 192 ++++++++++++++++++++++
configure.ac | 25 --
debian/changelog | 9 +
debian/control | 4
src/Makefile.am | 2
src/xf86MuTouch.c | 454 +++++++++++++++++++-----------------------------------
6 files changed, 374 insertions(+), 312 deletions(-)
New commits:
commit 57b1dc26eb78b72b8c6f0428651831e33a2fe387
Author: Cyril Brulebois <kibi@debian.org>
Date: Tue Jun 28 14:52:27 2011 +0200
Upload to unstable.
diff --git a/debian/changelog b/debian/changelog
index 1bbcd4c..adace55 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,11 @@
-xserver-xorg-input-mutouch (1:1.3.0-1) UNRELEASED; urgency=low
+xserver-xorg-input-mutouch (1:1.3.0-1) unstable; urgency=low
* New upstream release:
- Support Xserver 1.10 (Closes: #624964).
* Bump xserver-xorg-dev build-dep accordingly.
* Bump Standards-Version to 3.9.2 (no changes).
- -- Cyril Brulebois <kibi@debian.org> Tue, 28 Jun 2011 14:49:42 +0200
+ -- Cyril Brulebois <kibi@debian.org> Tue, 28 Jun 2011 14:52:24 +0200
xserver-xorg-input-mutouch (1:1.2.1-4) unstable; urgency=low
commit 4614b6713f09acff2c2242135490510e7179c9f7
Author: Cyril Brulebois <kibi@debian.org>
Date: Tue Jun 28 14:52:17 2011 +0200
Bump Standards-Version to 3.9.2 (no changes).
diff --git a/debian/changelog b/debian/changelog
index f1e6ef4..1bbcd4c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ xserver-xorg-input-mutouch (1:1.3.0-1) UNRELEASED; urgency=low
* New upstream release:
- Support Xserver 1.10 (Closes: #624964).
* Bump xserver-xorg-dev build-dep accordingly.
+ * Bump Standards-Version to 3.9.2 (no changes).
-- Cyril Brulebois <kibi@debian.org> Tue, 28 Jun 2011 14:49:42 +0200
diff --git a/debian/control b/debian/control
index 76b14bc..5158642 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,7 @@ Build-Depends:
x11proto-core-dev,
x11proto-randr-dev,
xutils-dev
-Standards-Version: 3.9.1
+Standards-Version: 3.9.2
Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-input-mutouch
Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-input-mutouch.git
commit 79f5d75ccb55c64d89ac533ddd1c2c40bf1c7b74
Author: Cyril Brulebois <kibi@debian.org>
Date: Tue Jun 28 14:52:03 2011 +0200
Bump xserver-xorg-dev build-dep accordingly.
diff --git a/debian/changelog b/debian/changelog
index f487620..f1e6ef4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ xserver-xorg-input-mutouch (1:1.3.0-1) UNRELEASED; urgency=low
* New upstream release:
- Support Xserver 1.10 (Closes: #624964).
+ * Bump xserver-xorg-dev build-dep accordingly.
-- Cyril Brulebois <kibi@debian.org> Tue, 28 Jun 2011 14:49:42 +0200
diff --git a/debian/control b/debian/control
index 9f7aee7..76b14bc 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Build-Depends:
dh-autoreconf,
quilt,
pkg-config,
- xserver-xorg-dev (>= 2:1.9.4),
+ xserver-xorg-dev (>= 2:1.10),
x11proto-input-dev,
x11proto-core-dev,
x11proto-randr-dev,
commit 9d5519670629340c725361977935bf9224ceeadd
Author: Cyril Brulebois <kibi@debian.org>
Date: Tue Jun 28 14:50:58 2011 +0200
Bump changelogs.
diff --git a/ChangeLog b/ChangeLog
index 24fad1c..75aa405 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,195 @@
+commit 42d5a96fc6cd69f3b787b5030386e0bcbb9b0cab
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Jun 28 11:32:14 2011 +1000
+
+ mutouch 1.3.0
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 7efc947e3cb2fe254f5b44bd1a0f4629fb777a95
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Jun 28 00:57:57 2011 +1000
+
+ Don't reset the stored device's private
+
+ Storing references to the finger/stylus pInfo is dangerous as-is,
+ but accessing them during the UnInit is suboptimal. This pInfo may have
+ been freed already.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit d23472b709fafd48f8403e6ea97918c06cc3caaf
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Jun 28 00:45:11 2011 +1000
+
+ Don't free pInfo in Uninit.
+
+ Just free priv, reset the pointer to NULL and let the server do the
+ rest.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 9aaaf67f5e0bb7419c24df041a75bb93e2f7c601
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Jun 28 00:43:18 2011 +1000
+
+ Don't call DEVICE_OFF during Uninit
+
+ The server will do it for us before anyway.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 041959f3fcdc473cb92437227522b2e986a1055e
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Jun 28 00:38:38 2011 +1000
+
+ Don't free pInfo on PreInit failure.
+
+ The server does it for us. Make sure we reset the private pointer to
+ NULL though.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit ea50c9d3a593d6dd2a45a12b39fe9c248ea25309
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Jun 28 00:37:45 2011 +1000
+
+ Require server 1.10 instead of manual ABI checks.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 29c3cb19938df97fd4a968ac010f48a2e25a3b72
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue Jun 28 00:35:13 2011 +1000
+
+ s/MicroTouch/MuTouch
+
+ I don't know what the difference is but we had a microtouch driver.
+ Having this driver spit out MicroTouch error messages is suboptimal.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 7de3fd29eaa2f7532658f706ee0471dde34f16d6
+Author: Julien Cristau <jcristau@debian.org>
+Date: Sat Apr 17 16:07:29 2010 +0200
+
+ Don't clobber CFLAGS
+
+ CFLAGS is a user variable, don't set it from configure.
+
+commit 24029451c591d324fc6e4a64d0bba70841bb1725
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri Dec 3 09:07:38 2010 +1000
+
+ Support input ABI 12
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Cyril Brulebois <kibi@debian.org>
+
+commit f7c4418ae0313b35d528fe28cfaf7899bc96e029
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri Dec 3 09:06:16 2010 +1000
+
+ Replace use of private_flags with driver-internal device_type.
+
+ private_flags is removed in input ABI 12 but it's not needed anyway.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Cyril Brulebois <kibi@debian.org>
+
+commit 3390adfb0c4cec5914a1c4e05bb95a6140fe6d31
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Dec 2 15:42:33 2010 +1000
+
+ Drop driver-specific motion history size handling.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Cyril Brulebois <kibi@debian.org>
+
+commit 9c887eceeb7f6bb1f9005bc2aeedeaa0a5d77ec4
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Dec 2 15:42:11 2010 +1000
+
+ Drop close_proc, conversion_proc, reverse_conversion_proc
+
+ All three are not called by the server anymore.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Cyril Brulebois <kibi@debian.org>
+
+commit 69ea6552035603f1813c80caa14cd8fba2778102
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Dec 2 15:38:46 2010 +1000
+
+ Drop libc wrappers for free, malloc
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Cyril Brulebois <kibi@debian.org>
+
+commit 287bbb905a28d8f9bcebacb7826f4902e438ec64
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Dec 2 15:37:15 2010 +1000
+
+ Replace LocalDevicePtr with InputInfoPtr.
+
+ LocalDevicePtr has been dropped from the server, but both describe the same
+ struct anyway.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Cyril Brulebois <kibi@debian.org>
+
+commit 40920147a87d7f069cf4406f1f50aed58a7ce7e0
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Dec 2 15:34:12 2010 +1000
+
+ Require server 1.9, drop earlier ABI support
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Cyril Brulebois <kibi@debian.org>
+
+commit 7ad420be74fec993f98fdfe746f037d803a6b927
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Dec 2 15:33:33 2010 +1000
+
+ Drop unused bits from configure.ac
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Cyril Brulebois <kibi@debian.org>
+
+commit dae0cddd64bc4ac01f47b8e1d0f298ca42c11382
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Dec 2 15:32:55 2010 +1000
+
+ Drop ref count, removed from server.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Cyril Brulebois <kibi@debian.org>
+
+commit 75eb5c3b9c70ac9d8c31a762ba9a1ec1dd2485f4
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Dec 2 15:32:45 2010 +1000
+
+ unifdef XFree86LOADER
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Cyril Brulebois <kibi@debian.org>
+
+commit 3443b6c6e5ea9f0c709ef865f1bf08ba68e66d67
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Dec 2 15:30:22 2010 +1000
+
+ Purge CVS tags
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit d0c22e3c02c25c9bef103f745c2648fb92ec3fa9
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu Dec 2 15:30:04 2010 +1000
+
+ Bump to 1.2.99
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
commit db04a5333b545a0442b995bae47d2c5527a7459e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Jul 17 14:18:51 2009 +1000
diff --git a/debian/changelog b/debian/changelog
index 59c9457..f487620 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-input-mutouch (1:1.3.0-1) UNRELEASED; urgency=low
+
+ * New upstream release:
+ - Support Xserver 1.10 (Closes: #624964).
+
+ -- Cyril Brulebois <kibi@debian.org> Tue, 28 Jun 2011 14:49:42 +0200
+
xserver-xorg-input-mutouch (1:1.2.1-4) unstable; urgency=low
* Switch to dh:
commit 42d5a96fc6cd69f3b787b5030386e0bcbb9b0cab
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Jun 28 11:32:14 2011 +1000
mutouch 1.3.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index f070450..9aaaa07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-input-mutouch],
- 1.2.99,
+ 1.3.0,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-input-mutouch)
commit 7efc947e3cb2fe254f5b44bd1a0f4629fb777a95
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Jun 28 00:57:57 2011 +1000
Don't reset the stored device's private
Storing references to the finger/stylus pInfo is dangerous as-is,
but accessing them during the UnInit is suboptimal. This pInfo may have
been freed already.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c
index d382b19..290fa11 100644
--- a/src/xf86MuTouch.c
+++ b/src/xf86MuTouch.c
@@ -1044,8 +1044,6 @@ xf86MuTUninit(InputDriverPtr drv,
MuTPrivatePtr priv = (MuTPrivatePtr) pInfo->private;
if (priv) {
- priv->stylus->private = NULL;
- priv->finger->private = NULL;
free(priv->input_dev);
free(priv);
pInfo->private = NULL;
commit d23472b709fafd48f8403e6ea97918c06cc3caaf
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Jun 28 00:45:11 2011 +1000
Don't free pInfo in Uninit.
Just free priv, reset the pointer to NULL and let the server do the
rest.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c
index aaf16df..d382b19 100644
--- a/src/xf86MuTouch.c
+++ b/src/xf86MuTouch.c
@@ -1048,9 +1048,8 @@ xf86MuTUninit(InputDriverPtr drv,
priv->finger->private = NULL;
free(priv->input_dev);
free(priv);
+ pInfo->private = NULL;
}
- free(pInfo->name);
- free(pInfo);
xf86DeleteInput(pInfo, 0);
}
commit 9aaaf67f5e0bb7419c24df041a75bb93e2f7c601
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Jun 28 00:43:18 2011 +1000
Don't call DEVICE_OFF during Uninit
The server will do it for us before anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c
index 01fb684..aaf16df 100644
--- a/src/xf86MuTouch.c
+++ b/src/xf86MuTouch.c
@@ -1043,8 +1043,6 @@ xf86MuTUninit(InputDriverPtr drv,
{
MuTPrivatePtr priv = (MuTPrivatePtr) pInfo->private;
- xf86MuTControl(pInfo->dev, DEVICE_OFF);
-
if (priv) {
priv->stylus->private = NULL;
priv->finger->private = NULL;
commit 041959f3fcdc473cb92437227522b2e986a1055e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Jun 28 00:38:38 2011 +1000
Don't free pInfo on PreInit failure.
The server does it for us. Make sure we reset the private pointer to
NULL though.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c
index 15b4d51..01fb684 100644
--- a/src/xf86MuTouch.c
+++ b/src/xf86MuTouch.c
@@ -1232,9 +1232,7 @@ xf86MuTInit(InputDriverPtr drv,
free(priv->input_dev);
}
free(priv);
- }
- if (pInfo) {
- free(pInfo);
+ pInfo->private = NULL;
}
return rc;
}
commit ea50c9d3a593d6dd2a45a12b39fe9c248ea25309
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Jun 28 00:37:45 2011 +1000
Require server 1.10 instead of manual ABI checks.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/configure.ac b/configure.ac
index a252306..f070450 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,7 +57,7 @@ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9.0] xproto $REQUIRED_MODULES)
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10.0] xproto $REQUIRED_MODULES)
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
# Checks for libraries.
diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c
index 5ef11e8..15b4d51 100644
--- a/src/xf86MuTouch.c
+++ b/src/xf86MuTouch.c
@@ -59,9 +59,6 @@
#include "xf86Module.h"
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
-#error "Need server with input ABI 12"
-#endif
/*
***************************************************************************
*
commit 29c3cb19938df97fd4a968ac010f48a2e25a3b72
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Jun 28 00:35:13 2011 +1000
s/MicroTouch/MuTouch
I don't know what the difference is but we had a microtouch driver.
Having this driver spit out MicroTouch error messages is suboptimal.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c
index cc9dcb3..5ef11e8 100644
--- a/src/xf86MuTouch.c
+++ b/src/xf86MuTouch.c
@@ -25,7 +25,7 @@
*******************************************************************************
*******************************************************************************
*
- * This driver is able to deal with MicroTouch serial controllers using
+ * This driver is able to deal with MuTouch serial controllers using
* firmware set 2. This includes (but may not be limited to) Serial/SMT3
* and TouchPen controllers. The only data format supported is Mode Tablet
* as it is the only available with these controllers. Anyway this is not a big
@@ -270,7 +270,7 @@ xf86MuTReadInput(InputInfoPtr pInfo)
(char *) (priv->rec_buf + priv->num_old_bytes),
MuT_BUFFER_SIZE - priv->num_old_bytes));
if (num_bytes < 0) {
- Error("System error while reading from MicroTouch touchscreen.");
+ Error("System error while reading from MuTouch touchscreen.");
return;
}
@@ -355,7 +355,7 @@ xf86MuTReadInput(InputInfoPtr pInfo)
if (!whinged) {
whinged++;
- ErrorF("MicroTouch screen sent %s event, but that device is not configured.\n",
+ ErrorF("MuTouch screen sent %s event, but that device is not configured.\n",
(state & MuT_WHICH_DEVICE)?"stylus":"finger");
ErrorF("You might want to consider altering your config accordingly.\n");
}
@@ -430,7 +430,7 @@ xf86MuTSendPacket(unsigned char *packet,
packet[5], packet[6], packet[7], packet[8], packet[9]));
SYSCALL(result = write(fd, packet, len+2));
if (result != len+2) {
- DBG(5, ErrorF("System error while sending to MicroTouch touchscreen.\n"));
+ DBG(5, ErrorF("System error while sending to MuTouch touchscreen.\n"));
return !Success;
}
else {
@@ -486,7 +486,7 @@ xf86MuTGetReply(unsigned char *buffer,
* Okay, give up.
*/
if (num_bytes < 0) {
- Error("System error while reading from MicroTouch touchscreen.");
+ Error("System error while reading from MuTouch touchscreen.");
return !Success;
}
DBG(4, ErrorF("Read %d bytes of reply\n", num_bytes));
@@ -624,7 +624,7 @@ xf86MuTPrintIdent(unsigned char *packet)
{
int vers, rev;
- xf86Msg(X_PROBED, "MicroTouch touchscreen is a ");
+ xf86Msg(X_PROBED, "MuTouch touchscreen is a ");
if (strncmp((char *) &packet[1], MuT_TOUCH_PEN_IDENT, 2) == 0) {
xf86Msg(X_NONE, "TouchPen");
}
@@ -636,7 +636,7 @@ xf86MuTPrintIdent(unsigned char *packet)
}
xf86Msg(X_NONE, ", connected through a serial port.\n");
sscanf((char *) &packet[3], "%2d%2d", &vers, &rev);
- xf86Msg(X_PROBED, "MicroTouch controller firmware revision is %d.%d.\n", vers, rev);
+ xf86Msg(X_PROBED, "MuTouch controller firmware revision is %d.%d.\n", vers, rev);
}
@@ -652,7 +652,7 @@ xf86MuTPrintIdent(unsigned char *packet)
static void
xf86MuTPrintHwStatus(unsigned char *packet)
{
- xf86Msg(X_PROBED, "MicroTouch status of errors: %c%c.\n", packet[7], packet[8]);
+ xf86Msg(X_PROBED, "MuTouch status of errors: %c%c.\n", packet[7], packet[8]);
}
@@ -696,7 +696,7 @@ xf86MuTControl(DeviceIntPtr dev,
case DEVICE_INIT:
{
- DBG(2, ErrorF("MicroTouch %s init...\n", id_string));
+ DBG(2, ErrorF("MuTouch %s init...\n", id_string));
if (priv->screen_no >= screenInfo.numScreens ||
priv->screen_no < 0) {
@@ -762,7 +762,7 @@ xf86MuTControl(DeviceIntPtr dev,
Bool already_open = FALSE;
char *report_what = "";
- DBG(2, ErrorF("MicroTouch %s on...\n", id_string));
+ DBG(2, ErrorF("MuTouch %s on...\n", id_string));
/*
* Try to see if the port has already been opened either
@@ -789,10 +789,10 @@ xf86MuTControl(DeviceIntPtr dev,
}
if (!already_open) {
- DBG(2, ErrorF("MicroTouch touchscreen opening : %s\n", priv->input_dev));
+ DBG(2, ErrorF("MuTouch touchscreen opening : %s\n", priv->input_dev));
pInfo->fd = xf86OpenSerial(pInfo->options);
if (pInfo->fd < 0) {
- Error("Unable to open MicroTouch touchscreen device");
+ Error("Unable to open MuTouch touchscreen device");
return !Success;
}
memset(req, 0, MuT_PACKET_SIZE);
@@ -809,7 +809,7 @@ xf86MuTControl(DeviceIntPtr dev,
strncpy((char *) &req[1], MuT_OUTPUT_IDENT, strlen(MuT_OUTPUT_IDENT));
if (xf86MuTSendCommand(req, strlen(MuT_OUTPUT_IDENT),
reply, pInfo->fd) != Success) {
- ErrorF("Unable to ask MicroTouch touchscreen identification\n");
+ ErrorF("Unable to ask MuTouch touchscreen identification\n");
goto not_success;
}
xf86MuTPrintIdent(reply);
@@ -817,7 +817,7 @@ xf86MuTControl(DeviceIntPtr dev,
strncpy((char *) &req[1], MuT_UNIT_TYPE, strlen(MuT_UNIT_TYPE));
if (xf86MuTSendCommand(req, strlen(MuT_UNIT_TYPE),
reply, pInfo->fd) != Success) {
- ErrorF("Unable to ask MicroTouch touchscreen status\n");
+ ErrorF("Unable to ask MuTouch touchscreen status\n");
goto not_success;
}
xf86MuTPrintHwStatus(reply);
@@ -829,14 +829,14 @@ xf86MuTControl(DeviceIntPtr dev,
strncpy((char *) &req[1], MuT_FORMAT_TABLET, strlen(MuT_FORMAT_TABLET));
if (xf86MuTSendCommand(req, strlen(MuT_FORMAT_TABLET),
NULL, pInfo->fd) != Success) {
- ErrorF("Unable to switch MicroTouch touchscreen to Tablet Format\n");
+ ErrorF("Unable to switch MuTouch touchscreen to Tablet Format\n");
goto not_success;
}
memset(req, 0, MuT_PACKET_SIZE);
strncpy((char *) &req[1], MuT_MODE_STREAM, strlen(MuT_MODE_STREAM));
if (xf86MuTSendCommand(req, strlen(MuT_MODE_STREAM),
NULL, pInfo->fd) != Success) {
- ErrorF("Unable to switch MicroTouch touchscreen to Stream Mode\n");
+ ErrorF("Unable to switch MuTouch touchscreen to Stream Mode\n");
goto not_success;
}
@@ -844,7 +844,7 @@ xf86MuTControl(DeviceIntPtr dev,
strncpy((char *) &req[1], MuT_PEN_ONLY, strlen(MuT_PEN_ONLY));
if (xf86MuTSendCommand(req, strlen(MuT_PEN_ONLY),
NULL, pInfo->fd) != Success) {
- ErrorF("Unable to change MicroTouch touchscreen to pen mode\n");
+ ErrorF("Unable to change MuTouch touchscreen to pen mode\n");
goto not_success;
}
/* goto not_success;*/
@@ -876,7 +876,7 @@ xf86MuTControl(DeviceIntPtr dev,
memset(req, 0, MuT_PACKET_SIZE);
strncpy((char *) &req[1], report_what, strlen(report_what));
if (xf86MuTSendCommand(req, strlen(report_what), NULL, pInfo->fd) != Success) {
- ErrorF("Unable to change MicroTouch touchscreen to %s\n",
+ ErrorF("Unable to change MuTouch touchscreen to %s\n",
(strcmp(report_what, MuT_PEN_FINGER) == 0) ? "Pen & Finger" :
((strcmp(report_what, MuT_PEN_ONLY) == 0) ? "Pen Only" : "Finger Only"));
goto not_success;
@@ -892,7 +892,7 @@ xf86MuTControl(DeviceIntPtr dev,
req[2+strlen(MuT_SET_FREQUENCY)] = '0';
req[3+strlen(MuT_SET_FREQUENCY)] = (priv->frequency<=9?'0':'A'-10)+priv->frequency;
if (xf86MuTSendCommand(req, strlen((char *) &req[1]), NULL, pInfo->fd) != Success) {
- ErrorF("Unable to set MicroTouch ThruGlass frquency to %d\n", priv->frequency);
+ ErrorF("Unable to set MuTouch ThruGlass frquency to %d\n", priv->frequency);
goto not_success;
}
}
@@ -911,7 +911,7 @@ xf86MuTControl(DeviceIntPtr dev,
* Deactivate the device.
*/
case DEVICE_OFF:
- DBG(2, ErrorF("MicroTouch %s off...\n", id_string));
+ DBG(2, ErrorF("MuTouch %s off...\n", id_string));
dev->public.on = FALSE;
DBG(2, ErrorF("Done\n"));
return Success;
@@ -921,7 +921,7 @@ xf86MuTControl(DeviceIntPtr dev,
* Close the port and free all the resources.
*/
case DEVICE_CLOSE:
- DBG(2, ErrorF("MicroTouch %s close...\n", id_string));
+ DBG(2, ErrorF("MuTouch %s close...\n", id_string));
dev->public.on = FALSE;
if (pInfo->fd >= 0) {
xf86RemoveEnabledDevice(pInfo);
@@ -1011,7 +1011,7 @@ xf86MuTAllocate(InputDriverPtr drv,
static int
xf86MuTAllocateFinger(InputDriverPtr drv, InputInfoPtr pInfo)
{
- int rc = xf86MuTAllocate(drv, pInfo, XI_FINGER, "MicroTouch Finger", FINGER_ID);
+ int rc = xf86MuTAllocate(drv, pInfo, XI_FINGER, "MuTouch Finger", FINGER_ID);
if (rc == Success) {
((MuTPrivatePtr) pInfo->private)->finger = pInfo;
@@ -1030,7 +1030,7 @@ xf86MuTAllocateFinger(InputDriverPtr drv, InputInfoPtr pInfo)
static int
xf86MuTAllocateStylus(InputDriverPtr drv, InputInfoPtr pInfo)
{
- int rc = xf86MuTAllocate(drv, pInfo, XI_STYLUS, "MicroTouch Stylus", STYLUS_ID);
+ int rc = xf86MuTAllocate(drv, pInfo, XI_STYLUS, "MuTouch Stylus", STYLUS_ID);
if (rc == Success) {
((MuTPrivatePtr) pInfo->private)->stylus = pInfo;
@@ -1090,7 +1090,7 @@ xf86MuTInit(InputDriverPtr drv,
rc = xf86MuTAllocateStylus(drv, pInfo);
}
else {
- xf86Msg(X_ERROR, "%s: Type field missing in Microtouch module config,\n"
+ xf86Msg(X_ERROR, "%s: Type field missing in MuTouch module config,\n"
"Must be stylus or finger\n", pInfo->name);
goto init_err;
}
@@ -1101,7 +1101,7 @@ xf86MuTInit(InputDriverPtr drv,
str = xf86FindOptionValue(pInfo->options, "Device");
if (!str) {
- xf86Msg(X_ERROR, "%s: No Device specified in Microtouch module config.\n",
+ xf86Msg(X_ERROR, "%s: No Device specified in MuTouch module config.\n",
pInfo->name);
rc = BadValue;
goto init_err;
@@ -1119,7 +1119,7 @@ xf86MuTInit(InputDriverPtr drv,
if ((pInfo != current) &&
(current->device_control == xf86MuTControl) &&
(strcmp(((MuTPrivatePtr) (current->private))->input_dev, priv->input_dev) == 0)) {
- xf86Msg(X_CONFIG, "MicroTouch config detected a device share between %s and %s\n",
+ xf86Msg(X_CONFIG, "MuTouch config detected a device share between %s and %s\n",
pInfo->name, current->name);
free(priv->input_dev);
free(priv);
@@ -1137,7 +1137,7 @@ xf86MuTInit(InputDriverPtr drv,
current = current->next;
}
if (!current) {
- xf86Msg(X_CONFIG, "MicroTouch %s input device: %s\n", pInfo->name, priv->input_dev);
+ xf86Msg(X_CONFIG, "MuTouch %s input device: %s\n", pInfo->name, priv->input_dev);
}
/* Process the common options. */
@@ -1147,30 +1147,30 @@ xf86MuTInit(InputDriverPtr drv,
if (str) {
pInfo->name = strdup(str);
}
- xf86Msg(X_CONFIG, "Microtouch X device name: %s\n", pInfo->name);
+ xf86Msg(X_CONFIG, "MuTouch X device name: %s\n", pInfo->name);
priv->screen_no = xf86SetIntOption(pInfo->options, "ScreenNo", 0);
- xf86Msg(X_CONFIG, "Microtouch associated screen: %d\n", priv->screen_no);
+ xf86Msg(X_CONFIG, "MuTouch associated screen: %d\n", priv->screen_no);
priv->max_x = xf86SetIntOption(pInfo->options, "MaxX", 3000);
- xf86Msg(X_CONFIG, "Microtouch maximum x position: %d\n", priv->max_x);
+ xf86Msg(X_CONFIG, "MuTouch maximum x position: %d\n", priv->max_x);
priv->min_x = xf86SetIntOption(pInfo->options, "MinX", 0);
- xf86Msg(X_CONFIG, "Microtouch minimum x position: %d\n", priv->min_x);
+ xf86Msg(X_CONFIG, "MuTouch minimum x position: %d\n", priv->min_x);
priv->max_y = xf86SetIntOption(pInfo->options, "MaxY", 3000);
- xf86Msg(X_CONFIG, "Microtouch maximum y position: %d\n", priv->max_y);
+ xf86Msg(X_CONFIG, "MuTouch maximum y position: %d\n", priv->max_y);
priv->min_y = xf86SetIntOption(pInfo->options, "MinY", 0);
- xf86Msg(X_CONFIG, "Microtouch minimum y position: %d\n", priv->min_y);
+ xf86Msg(X_CONFIG, "MuTouch minimum y position: %d\n", priv->min_y);
priv->frequency = xf86SetIntOption(pInfo->options, "Frequency", 0);
- xf86Msg(X_CONFIG, "Microtouch ThruGlass frequency is: %d\n", priv->frequency);
+ xf86Msg(X_CONFIG, "MuTouch ThruGlass frequency is: %d\n", priv->frequency);
priv->swap_axes = xf86SetBoolOption(pInfo->options, "SwapXY", 0);
if (priv->swap_axes) {
- xf86Msg(X_CONFIG, "Microtouch %s device will work with X and Y axes swapped\n",
+ xf86Msg(X_CONFIG, "MuTouch %s device will work with X and Y axes swapped\n",
pInfo->name);
}
debug_level = xf86SetIntOption(pInfo->options, "DebugLevel", 0);
if (debug_level) {
#if DEBUG
- xf86Msg(X_CONFIG, "Microtouch debug level sets to %d\n", debug_level);
+ xf86Msg(X_CONFIG, "MuTouch debug level sets to %d\n", debug_level);
#else
- xf86Msg(X_INFO, "Microtouch debug not available\n");
+ xf86Msg(X_INFO, "MuTouch debug not available\n");
#endif
}
str = xf86SetStrOption(pInfo->options, "PortraitMode", "Landscape");
@@ -1181,14 +1181,14 @@ xf86MuTInit(InputDriverPtr drv,
portrait = -1;
}
else if (strcmp(str, "Landscape") != 0) {
- xf86Msg(X_ERROR, "Microtouch portrait mode should be: Portrait, Landscape or PortraitCCW");
+ xf86Msg(X_ERROR, "MuTouch portrait mode should be: Portrait, Landscape or PortraitCCW");
str = "Landscape";
}
- xf86Msg(X_CONFIG, "Microtouch device will work in %s mode\n", str);
+ xf86Msg(X_CONFIG, "MuTouch device will work in %s mode\n", str);
if (priv->max_x - priv->min_x <= 0) {
int tmp;
- xf86Msg(X_INFO, "MicroTouch: reverse x mode (minimum x position >= maximum x position)\n");
+ xf86Msg(X_INFO, "MuTouch: reverse x mode (minimum x position >= maximum x position)\n");
tmp = priv->max_x; /* X server doesn't do inverted by itself*/
priv->max_x = priv->min_x;
priv->min_x = tmp;
@@ -1198,7 +1198,7 @@ xf86MuTInit(InputDriverPtr drv,
if (priv->max_y - priv->min_y <= 0) {
int tmp;
- xf86Msg(X_INFO, "MicroTouch: reverse y mode (minimum y position >= maximum y position)\n");
+ xf86Msg(X_INFO, "MuTouch: reverse y mode (minimum y position >= maximum y position)\n");
tmp = priv->max_y;
priv->max_y = priv->min_y;
priv->min_y = tmp;
commit 7de3fd29eaa2f7532658f706ee0471dde34f16d6
Author: Julien Cristau <jcristau@debian.org>
Date: Sat Apr 17 16:07:29 2010 +0200
Don't clobber CFLAGS
CFLAGS is a user variable, don't set it from configure.
diff --git a/configure.ac b/configure.ac
index 4b0e04d..a252306 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,9 +60,6 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9.0] xproto $REQUIRED_MODULES)
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
-CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src'
-AC_SUBST([CFLAGS])
-
# Checks for libraries.
# Checks for header files.
diff --git a/src/Makefile.am b/src/Makefile.am
index 5ddc0b7..194d9c6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,3 +29,5 @@
@DRIVER_NAME@_drv_ladir = @inputdir@
@DRIVER_NAME@_drv_la_SOURCES = xf86MuTouch.c
+
+AM_CFLAGS = $(XORG_CFLAGS)
commit 24029451c591d324fc6e4a64d0bba70841bb1725
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Dec 3 09:07:38 2010 +1000
Support input ABI 12
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c
index 4312256..cc9dcb3 100644
--- a/src/xf86MuTouch.c
+++ b/src/xf86MuTouch.c
@@ -59,6 +59,9 @@
#include "xf86Module.h"
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
+#error "Need server with input ABI 12"
+#endif
/*
***************************************************************************
*
@@ -727,12 +730,14 @@ xf86MuTControl(DeviceIntPtr dev,
priv->min_x, priv->max_x,
9500,
0 /* min_res */,
- 9500 /* max_res */);
+ 9500 /* max_res */,
+ Absolute);
InitValuatorAxisStruct(dev, 1, axis_labels[1],
priv->min_y, priv->max_y,
10500,
0 /* min_res */,
- 10500 /* max_res */);
+ 10500 /* max_res */,
+ Absolute);
}
if (InitFocusClassDeviceStruct(dev) == FALSE) {
@@ -953,26 +958,17 @@ xf86MuTControl(DeviceIntPtr dev,
*
***************************************************************************
*/
-static InputInfoPtr
+static int
xf86MuTAllocate(InputDriverPtr drv,
+ InputInfoPtr pInfo,
char *name,
char *type_name,
int flag)
{
- InputInfoPtr pInfo = xf86AllocateInput(drv, 0);
MuTPrivatePtr priv = (MuTPrivatePtr) malloc(sizeof(MuTPrivateRec));
- if (!pInfo) {
- if (priv) {
- free(priv);
- }
- return NULL;
- }
if (!priv) {
- if (pInfo) {
- free(pInfo);
- }
- return NULL;
+ return BadAlloc;
}
priv->input_dev = strdup(MuT_PORT);
@@ -992,19 +988,16 @@ xf86MuTAllocate(InputDriverPtr drv,
priv->frequency = 0;
priv->device_type = flag;
- pInfo->name = name;
pInfo->flags = 0 /* XI86_NO_OPEN_ON_INIT */;
pInfo->device_control = xf86MuTControl;
pInfo->read_input = xf86MuTReadInput;
pInfo->control_proc = NULL;
pInfo->switch_mode = NULL;
pInfo->fd = -1;
- pInfo->atom = 0;
- pInfo->dev = NULL;
pInfo->private = priv;
pInfo->type_name = type_name;
- return pInfo;
+ return Success;
}
@@ -1015,15 +1008,15 @@ xf86MuTAllocate(InputDriverPtr drv,
*
***************************************************************************
*/
-static InputInfoPtr
-xf86MuTAllocateFinger(InputDriverPtr drv)
+static int
+xf86MuTAllocateFinger(InputDriverPtr drv, InputInfoPtr pInfo)
{
- InputInfoPtr pInfo = xf86MuTAllocate(drv, XI_FINGER, "MicroTouch Finger", FINGER_ID);
+ int rc = xf86MuTAllocate(drv, pInfo, XI_FINGER, "MicroTouch Finger", FINGER_ID);
- if (pInfo) {
+ if (rc == Success) {
((MuTPrivatePtr) pInfo->private)->finger = pInfo;
}
- return pInfo;
+ return rc;
}
@@ -1034,15 +1027,15 @@ xf86MuTAllocateFinger(InputDriverPtr drv)
*
***************************************************************************
*/
-static InputInfoPtr
-xf86MuTAllocateStylus(InputDriverPtr drv)
+static int
+xf86MuTAllocateStylus(InputDriverPtr drv, InputInfoPtr pInfo)
{
- InputInfoPtr pInfo = xf86MuTAllocate(drv, XI_STYLUS, "MicroTouch Stylus", STYLUS_ID);
+ int rc = xf86MuTAllocate(drv, pInfo, XI_STYLUS, "MicroTouch Stylus", STYLUS_ID);
- if (pInfo) {
+ if (rc == Success) {
((MuTPrivatePtr) pInfo->private)->stylus = pInfo;
}
- return pInfo;
+ return rc;
}
@@ -1067,7 +1060,7 @@ xf86MuTUninit(InputDriverPtr drv,
xf86DeleteInput(pInfo, 0);
}
-static const char *default_options[] = {
+static char *default_options[] = {
"BaudRate", "9600",
"StopBits", "1",
"DataBits", "8",
@@ -1078,49 +1071,39 @@ static const char *default_options[] = {
NULL
};
-static InputInfoPtr
+static int
xf86MuTInit(InputDriverPtr drv,
- IDevPtr dev,
+ InputInfoPtr pInfo,
int flags)
{
- InputInfoPtr pInfo=NULL, fake_pInfo=NULL, current;
+ InputInfoPtr current;
MuTPrivatePtr priv=NULL;
char *str;
int portrait=0;
+ int rc = Success;
- fake_pInfo = (InputInfoPtr) calloc(1, sizeof(InputInfoRec));
- if (!fake_pInfo) {
- goto init_err;
- }
Reply to: