summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpingc <pingc>2008-08-12 19:37:59 +0000
committerpingc <pingc>2008-08-12 19:37:59 +0000
commitd808be5022778375831e9351242aaf282bdd559c (patch)
tree7342810b2fe8d9830116565398a2e9a42bb37e3e
parentd8142c4c2ebac44a8fb8159c69c564b7ee613e68 (diff)
downloadxf86-input-wacom-d808be5022778375831e9351242aaf282bdd559c.tar.gz
Added support for serial capacitive TabletPCrelease-0.8.1-3
-rw-r--r--ChangeLog7
-rw-r--r--configure.in39
-rwxr-xr-xsrc/2.6.11/wacom_sys.c14
-rwxr-xr-xsrc/2.6.13/wacom_sys.c14
-rwxr-xr-xsrc/2.6.15/wacom_sys.c14
-rw-r--r--src/2.6.16/wacom_sys.c14
-rwxr-xr-xsrc/2.6.19/wacom_sys.c14
-rwxr-xr-xsrc/2.6.22/wacom_sys.c14
-rwxr-xr-xsrc/2.6.24/wacom_sys.c14
-rwxr-xr-xsrc/2.6.26/wacom_sys.c14
-rw-r--r--src/include/util-config.h.in3
-rw-r--r--src/include/xdrv-config.h.in3
-rwxr-xr-xsrc/util/Makefile.am2
-rwxr-xr-xsrc/util/wacomcfg.c40
-rwxr-xr-xsrc/xdrv/wcmConfig.c7
-rwxr-xr-xsrc/xdrv/wcmISDV4.c88
-rwxr-xr-xsrc/xdrv/wcmUSB.c3
-rwxr-xr-xsrc/xdrv/xf86WacomDefs.h9
18 files changed, 221 insertions, 92 deletions
diff --git a/ChangeLog b/ChangeLog
index e9a77c7..f9abb07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-08-11 Ping Cheng <pingc@wacom.com>
+ * Merged patch 1994583 (Craig Wiegert) for wacom_sys.c
+ * Merged patch 2035856 (Trifon Trifonov) for Uninit on Xorg 7.3 and later
+ * Modified configure.in for Danny's patch
+ * Added serial Tablet PC with capacitive touch
+ * Label 0.8.1-3
+
2008-08-01 Ping Cheng <pingc@wacom.com>
* Added kernel 2.6.26 support
* Updated USB Tablet PC pressure data in kernel
diff --git a/configure.in b/configure.in
index d28b09d..5a9c8ae 100644
--- a/configure.in
+++ b/configure.in
@@ -300,6 +300,7 @@ dnl =======================================================
dnl Check for Xlib
WCM_CLEVEL=-ansi
WCM_ENV_XLIB=no
+WCM_ENV_XF86CONFIG=no
WCM_XLIB_DIR=
WCM_XSERVER64=
AC_ARG_WITH(xlib,
@@ -350,6 +351,11 @@ if test "$WCM_ENV_XLIB" = yes; then
CFLAGS="$CFLAGS -D__amd64__"
WCM_XSERVER64="-D_XSERVER64"
fi
+ AC_MSG_CHECKING(for lib xf86config)
+ if test -f $WCM_XLIB_DIR/libxf86config.a -o -f $WCM_XLIB_DIR/libxf86config.so; then
+ AC_MSG_RESULT([found, $WCM_XLIB_DIR])
+ WCM_ENV_XF86CONFIG=yes
+ fi
fi
dnl =======================================================
@@ -496,6 +502,32 @@ if test "$WCM_ENV_XFREE86" != yes; then
AC_DEFINE(WCM_XORG_TABLET_SCALING,1,
[Some X.org versions require that the events are scaled to screen size])
fi
+ WCM_UNINIT_CALLED=
+ AC_ARG_ENABLE(quirk-Uninit-called,
+ AC_HELP_STRING([--enable-quirk-Uninit-called],
+ [Enable Uninit called [[default=when_needed]]]),
+ WCM_UNINIT_CALLED=$enableval)
+ if test -z "$WCM_UNINIT_CALLED"; then
+ AC_MSG_CHECKING([if Uninit is called])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="-I$WCM_XORGSDK_DIR $CFLAGS"
+ AC_TRY_COMPILE([
+#include <xorg-server.h>
+#include <xorgVersion.h>
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 4, 0, 0, 0)
+# error "Xserver < 1.4 doesn't call Uninit"
+#elif XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6, 0, 0, 0, 0)
+# error "X.org < 7.3 doesn't call Uninit"
+#endif
+], , [WCM_UNINIT_CALLED=yes], [WCM_UNINIT_CALLED=no])
+ CFLAGS="$save_CFLAGS"
+ AC_MSG_RESULT($WCM_UNINIT_CALLED)
+ fi
+ if test "$WCM_UNINIT_CALLED" = "yes"; then
+ WCM_XDRIVER_QUIRKS="$WCM_XDRIVER_QUIRKS Uninit-called"
+ AC_DEFINE(WCM_XORG_XSERVER_1_4,1,
+ [Xserver versions 1.4 and later call Uninit before closing a device])
+ fi
AC_MSG_CHECKING([if Xorg SDK defines IsXExtensionPointer])
save_CFLAGS="$CFLAGS"
CFLAGS="-I$WCM_XORGSDK_DIR $CFLAGS"
@@ -734,6 +766,12 @@ if test "$enable_libwacomcfg" != no; then
WCM_OPTION_LIBWACOMCFG=yes
WCM_LIBWACOMCFG_LIBS="-L$WCM_XLIB_DIR -lX11 -lXi"
WCM_LIBS="$WCM_LIBS libwacomcfg.la"
+ if test "$WCM_ENV_XF86CONFIG" = yes; then
+ AC_DEFINE(WCM_XF86CONFIG,1,[libxf86config is included])
+ WCM_LIBWACOMCFG_LIBS="-L$WCM_LIBWACOMCFG_LIBS -lxf86config -lm"
+ else
+ AC_DEFINE(WCM_XF86CONFIG,0,[libxf86config isn't included])
+ fi
else
AC_MSG_WARN([XLib environment missing, libwacomcfg not built])
fi
@@ -991,6 +1029,7 @@ echo " Xorg SDK - $WCM_ENV_XORGSDK $WCM_XORGSDK_DIR"
echo " XSERVER64 - $WCM_OPTION_XSERVER64"
echo " dlloader - $WCM_OPTION_DLLOADER"
echo " XLib - $WCM_ENV_XLIB $WCM_XLIB_DIR"
+echo " xf86config - $WCM_ENV_XF86CONFIG $WCM_XLIB_DIR"
echo " TCL - $WCM_ENV_TCL $WCM_TCL_DIR"
echo " TK - $WCM_ENV_TK $WCM_TK_DIR"
echo " ncurses - $WCM_ENV_NCURSES"
diff --git a/src/2.6.11/wacom_sys.c b/src/2.6.11/wacom_sys.c
index 4916346..7a3fbc9 100755
--- a/src/2.6.11/wacom_sys.c
+++ b/src/2.6.11/wacom_sys.c
@@ -187,7 +187,7 @@ static void wacom_close(struct input_dev *dev)
void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_1) | BIT(BTN_5);
input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
}
@@ -196,14 +196,14 @@ void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT(EV_MSC);
input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_4);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_0) | BIT(BTN_4);
}
void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->evbit[0] |= BIT(EV_REL);
input_dev->relbit[0] |= BIT(REL_WHEEL);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
+ input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_STYLUS2);
input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
}
@@ -211,20 +211,20 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0);
}
void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
}
void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_8) | BIT(BTN_9);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_8) | BIT(BTN_9);
}
void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
@@ -232,7 +232,7 @@ void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT(EV_MSC) | BIT(EV_REL);
input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_dev->relbit[0] |= BIT(REL_WHEEL);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA);
+ input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_TOOL_BRUSH)
| BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS) | BIT(BTN_STYLUS2);
input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
diff --git a/src/2.6.13/wacom_sys.c b/src/2.6.13/wacom_sys.c
index c7c69fe..368d998 100755
--- a/src/2.6.13/wacom_sys.c
+++ b/src/2.6.13/wacom_sys.c
@@ -186,7 +186,7 @@ static void wacom_close(struct input_dev *dev)
void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_1) | BIT(BTN_5);
input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
}
@@ -195,14 +195,14 @@ void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT(EV_MSC);
input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_4);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_0) | BIT(BTN_4);
}
void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->evbit[0] |= BIT(EV_REL);
input_dev->relbit[0] |= BIT(REL_WHEEL);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
+ input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_STYLUS2);
input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
}
@@ -210,20 +210,20 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0);
}
void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
}
void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_8) | BIT(BTN_9);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_8) | BIT(BTN_9);
}
void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
@@ -231,7 +231,7 @@ void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT(EV_MSC) | BIT(EV_REL);
input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_dev->relbit[0] |= BIT(REL_WHEEL);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA);
+ input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_TOOL_BRUSH)
| BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS) | BIT(BTN_STYLUS2);
input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
diff --git a/src/2.6.15/wacom_sys.c b/src/2.6.15/wacom_sys.c
index 7984791..6d07a95 100755
--- a/src/2.6.15/wacom_sys.c
+++ b/src/2.6.15/wacom_sys.c
@@ -181,7 +181,7 @@ static void wacom_close(struct input_dev *dev)
void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_1) | BIT(BTN_5);
input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
}
@@ -190,14 +190,14 @@ void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT(EV_MSC);
input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_4);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_0) | BIT(BTN_4);
}
void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->evbit[0] |= BIT(EV_REL);
input_dev->relbit[0] |= BIT(REL_WHEEL);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
+ input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_STYLUS2);
input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
}
@@ -205,20 +205,20 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0);
}
void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
}
void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_8) | BIT(BTN_9);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_8) | BIT(BTN_9);
}
void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
@@ -226,7 +226,7 @@ void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT(EV_MSC) | BIT(EV_REL);
input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_dev->relbit[0] |= BIT(REL_WHEEL);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA);
+ input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_TOOL_BRUSH)
| BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS) | BIT(BTN_STYLUS2);
input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
diff --git a/src/2.6.16/wacom_sys.c b/src/2.6.16/wacom_sys.c
index 19e4b58..cf38a1a 100644
--- a/src/2.6.16/wacom_sys.c
+++ b/src/2.6.16/wacom_sys.c
@@ -180,7 +180,7 @@ static void wacom_close(struct input_dev *dev)
void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_1) | BIT(BTN_5);
input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
}
@@ -189,14 +189,14 @@ void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT(EV_MSC);
input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_4);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_0) | BIT(BTN_4);
}
void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->evbit[0] |= BIT(EV_REL);
input_dev->relbit[0] |= BIT(REL_WHEEL);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
+ input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_STYLUS2);
input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
}
@@ -204,20 +204,20 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0);
}
void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
}
void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_8) | BIT(BTN_9);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_8) | BIT(BTN_9);
}
void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
@@ -225,7 +225,7 @@ void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT(EV_MSC) | BIT(EV_REL);
input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_dev->relbit[0] |= BIT(REL_WHEEL);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA);
+ input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_TOOL_BRUSH)
| BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS) | BIT(BTN_STYLUS2);
input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
diff --git a/src/2.6.19/wacom_sys.c b/src/2.6.19/wacom_sys.c
index c733766..4134709 100755
--- a/src/2.6.19/wacom_sys.c
+++ b/src/2.6.19/wacom_sys.c
@@ -174,7 +174,7 @@ static void wacom_close(struct input_dev *dev)
void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_1) | BIT(BTN_5);
input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
}
@@ -183,14 +183,14 @@ void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT(EV_MSC);
input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_4);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_0) | BIT(BTN_4);
}
void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->evbit[0] |= BIT(EV_REL);
input_dev->relbit[0] |= BIT(REL_WHEEL);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
+ input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_STYLUS2);
input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
}
@@ -198,20 +198,20 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0);
}
void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
}
void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_8) | BIT(BTN_9);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_8) | BIT(BTN_9);
}
void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
@@ -219,7 +219,7 @@ void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT(EV_MSC) | BIT(EV_REL);
input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_dev->relbit[0] |= BIT(REL_WHEEL);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA);
+ input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_TOOL_BRUSH)
| BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS) | BIT(BTN_STYLUS2);
input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
diff --git a/src/2.6.22/wacom_sys.c b/src/2.6.22/wacom_sys.c
index 5c9e323..6569eb9 100755
--- a/src/2.6.22/wacom_sys.c
+++ b/src/2.6.22/wacom_sys.c
@@ -174,7 +174,7 @@ static void wacom_close(struct input_dev *dev)
void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_1) | BIT(BTN_5);
input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
}
@@ -183,14 +183,14 @@ void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT(EV_MSC);
input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_4);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_0) | BIT(BTN_4);
}
void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->evbit[0] |= BIT(EV_REL);
input_dev->relbit[0] |= BIT(REL_WHEEL);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
+ input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_STYLUS2);
input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
}
@@ -198,20 +198,20 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0);
}
void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
}
void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_8) | BIT(BTN_9);
+ input_dev->keybit[LONG(BTN_MISC)] |= BIT(BTN_8) | BIT(BTN_9);
}
void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
@@ -219,7 +219,7 @@ void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT(EV_MSC) | BIT(EV_REL);
input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_dev->relbit[0] |= BIT(REL_WHEEL);
- input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA);
+ input_dev->keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE) | BIT(BTN_SIDE) | BIT(BTN_EXTRA);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE) | BIT(BTN_TOOL_BRUSH)
| BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS) | BIT(BTN_STYLUS2);
input_set_abs_params(input_dev, ABS_DISTANCE, 0, wacom_wac->features->distance_max, 0, 0);
diff --git a/src/2.6.24/wacom_sys.c b/src/2.6.24/wacom_sys.c
index 2ee7d59..5560186 100755
--- a/src/2.6.24/wacom_sys.c
+++ b/src/2.6.24/wacom_sys.c
@@ -176,7 +176,7 @@ static void wacom_close(struct input_dev *dev)
void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_1) |
+ input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_1) |
BIT_MASK(BTN_5);
input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
}
@@ -186,7 +186,7 @@ void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT_MASK(EV_MSC);
input_dev->mscbit[0] |= BIT_MASK(MSC_SERIAL);
input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_FINGER);
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) |
+ input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_0) |
BIT_MASK(BTN_4);
}
@@ -194,7 +194,7 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->evbit[0] |= BIT_MASK(EV_REL);
input_dev->relbit[0] |= BIT_MASK(REL_WHEEL);
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_LEFT) |
+ input_dev->keybit[BIT_WORD(BTN_MOUSE)] |= BIT_MASK(BTN_LEFT) |
BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE);
input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER) |
BIT_MASK(BTN_TOOL_MOUSE) | BIT_MASK(BTN_STYLUS2);
@@ -204,7 +204,7 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_FINGER);
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) |
+ input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_0) |
BIT_MASK(BTN_1) | BIT_MASK(BTN_2) | BIT_MASK(BTN_3);
input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0);
@@ -212,14 +212,14 @@ void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_4) |
+ input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_4) |
BIT_MASK(BTN_5) | BIT_MASK(BTN_6) | BIT_MASK(BTN_7);
input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
}
void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_8) | BIT_MASK(BTN_9);
+ input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_8) | BIT_MASK(BTN_9);
}
void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
@@ -227,7 +227,7 @@ void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT_MASK(EV_MSC) | BIT_MASK(EV_REL);
input_dev->mscbit[0] |= BIT_MASK(MSC_SERIAL);
input_dev->relbit[0] |= BIT_MASK(REL_WHEEL);
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_LEFT) |
+ input_dev->keybit[BIT_WORD(BTN_MOUSE)] |= BIT_MASK(BTN_LEFT) |
BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE) |
BIT_MASK(BTN_SIDE) | BIT_MASK(BTN_EXTRA);
input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER) |
diff --git a/src/2.6.26/wacom_sys.c b/src/2.6.26/wacom_sys.c
index 0f8bc63..f88cf1d 100755
--- a/src/2.6.26/wacom_sys.c
+++ b/src/2.6.26/wacom_sys.c
@@ -194,7 +194,7 @@ static void wacom_close(struct input_dev *dev)
void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_1) |
+ input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_1) |
BIT_MASK(BTN_5);
input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
}
@@ -204,7 +204,7 @@ void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT_MASK(EV_MSC);
input_dev->mscbit[0] |= BIT_MASK(MSC_SERIAL);
input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_FINGER);
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) |
+ input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_0) |
BIT_MASK(BTN_4);
}
@@ -212,7 +212,7 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->evbit[0] |= BIT_MASK(EV_REL);
input_dev->relbit[0] |= BIT_MASK(REL_WHEEL);
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_LEFT) |
+ input_dev->keybit[BIT_WORD(BTN_MOUSE)] |= BIT_MASK(BTN_LEFT) |
BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE);
input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER) |
BIT_MASK(BTN_TOOL_MOUSE) | BIT_MASK(BTN_STYLUS2);
@@ -222,7 +222,7 @@ void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_FINGER);
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) |
+ input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_0) |
BIT_MASK(BTN_1) | BIT_MASK(BTN_2) | BIT_MASK(BTN_3);
input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0);
@@ -230,14 +230,14 @@ void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_4) |
+ input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_4) |
BIT_MASK(BTN_5) | BIT_MASK(BTN_6) | BIT_MASK(BTN_7);
input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
}
void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
{
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_8) | BIT_MASK(BTN_9);
+ input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_8) | BIT_MASK(BTN_9);
}
void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
@@ -245,7 +245,7 @@ void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
input_dev->evbit[0] |= BIT_MASK(EV_MSC) | BIT_MASK(EV_REL);
input_dev->mscbit[0] |= BIT_MASK(MSC_SERIAL);
input_dev->relbit[0] |= BIT_MASK(REL_WHEEL);
- input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_LEFT) |
+ input_dev->keybit[BIT_WORD(BTN_MOUSE)] |= BIT_MASK(BTN_LEFT) |
BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_MIDDLE) |
BIT_MASK(BTN_SIDE) | BIT_MASK(BTN_EXTRA);
input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER) |
diff --git a/src/include/util-config.h.in b/src/include/util-config.h.in
index 290ef1d..ee28a82 100644
--- a/src/include/util-config.h.in
+++ b/src/include/util-config.h.in
@@ -12,4 +12,7 @@
/* IsXExtensionPointer is only defined in later X.org releases */
#undef WCM_ISXEXTENSIONPOINTER
+/* xf86config lib is only included in some Xorg systems */
+#undef WCM_XF86CONFIG
+
#endif /* _UTIL_CONFIG_H_ */
diff --git a/src/include/xdrv-config.h.in b/src/include/xdrv-config.h.in
index 86ba5fa..a814691 100644
--- a/src/include/xdrv-config.h.in
+++ b/src/include/xdrv-config.h.in
@@ -24,6 +24,9 @@
/* Some X.org versions require that the events are scaled to screen size */
#undef WCM_XORG_TABLET_SCALING
+/* Xserver versions 1.4 and later call Uninit before closing a device. */
+#undef WCM_XORG_XSERVER_1_4
+
/* The X-driver can send key events for a button */
#undef WCM_KEY_SENDING_SUPPORT
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 1891b63..43616d6 100755
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -36,7 +36,7 @@ endif
libwacomcfg_la_SOURCES = wacomcfg.c wacomcfg.h ../include/Xwacom.h
libwacomcfg_la_LDFLAGS = -no-undefined -version-info @WCM_LIBWACOMCFG_VER@
-libwacomcfg_la_LIBADD = @WCM_LIBWACOMCFG_LIBS@ -lxf86config -lm
+libwacomcfg_la_LIBADD = @WCM_LIBWACOMCFG_LIBS@
xsetwacom_SOURCES = xsetwacom.c wacomcfg.h wcmAction.c wcmAction.h ../include/Xwacom.h
xsetwacom_LDADD = libwacomcfg.la
diff --git a/src/util/wacomcfg.c b/src/util/wacomcfg.c
index 33f68d8..e2c1a35 100755
--- a/src/util/wacomcfg.c
+++ b/src/util/wacomcfg.c
@@ -46,13 +46,15 @@
#include <memory.h>
#include <assert.h>
-#include "xf86Parser.h"
-
-WACOMDEVICETYPE checkIfWacomDevice (XF86ConfigPtr, const char*);
-WACOMDEVICETYPE mapStringToType (const char*);
-XF86ConfigPtr readConfig (char *);
-void VErrorF(const char*, va_list);
-void ErrorF (const char*, ...);
+#if WCM_XF86CONFIG
+ #include "xf86Parser.h"
+
+ WACOMDEVICETYPE checkIfWacomDevice (XF86ConfigPtr, const char*);
+ WACOMDEVICETYPE mapStringToType (const char*);
+ XF86ConfigPtr readConfig (char *);
+ void VErrorF(const char*, va_list);
+ void ErrorF (const char*, ...);
+#endif
/*****************************************************************************
** Internal structures
@@ -131,7 +133,9 @@ int WacomConfigListDevices(WACOMCONFIG *hConfig, WACOMDEVICEINFO** ppInfo,
unsigned char* pReq;
WACOMDEVICEINFO* pInfo;
XDeviceInfo* info;
+#if WCM_XF86CONFIG
XF86ConfigPtr conf;
+#endif
char devName[64];
if (!hConfig || !ppInfo || !puCount)
@@ -141,8 +145,10 @@ int WacomConfigListDevices(WACOMCONFIG *hConfig, WACOMDEVICEINFO** ppInfo,
if (!hConfig->pDevs && CfgGetDevs(hConfig))
return -1;
+#if WCM_XF86CONFIG
/* read the config in for wacom devices which don'T use the commnon identifier */
conf = readConfig ("/etc/X11/xorg.conf");
+#endif
/* estimate size of memory needed to hold structures */
nSize = nCount = 0;
@@ -194,12 +200,28 @@ int WacomConfigListDevices(WACOMCONFIG *hConfig, WACOMDEVICEINFO** ppInfo,
devName[j] = tolower(pInfo->pszName[j]);
devName[j] = '\0';
+#if WCM_XF86CONFIG
pInfo->type = mapStringToType (devName);
if ( pInfo->type == WACOMDEVICETYPE_UNKNOWN )
pInfo->type = checkIfWacomDevice (conf, pInfo->pszName);
+ else
+#else
+ if (strstr(devName,"cursor") != NULL)
+ pInfo->type = WACOMDEVICETYPE_CURSOR;
+ else if (strstr(devName,"stylus") != NULL)
+ pInfo->type = WACOMDEVICETYPE_STYLUS;
+ else if (strstr(devName,"eraser") != NULL)
+ pInfo->type = WACOMDEVICETYPE_ERASER;
+ else if (strstr(devName,"touch") != NULL)
+ pInfo->type = WACOMDEVICETYPE_TOUCH;
+ else if (strstr(devName,"pad") != NULL)
+ pInfo->type = WACOMDEVICETYPE_PAD;
+ else
+ pInfo->type = WACOMDEVICETYPE_UNKNOWN;
if ( pInfo->type != WACOMDEVICETYPE_UNKNOWN )
+#endif
{
++pInfo;
++nCount;
@@ -214,6 +236,7 @@ int WacomConfigListDevices(WACOMCONFIG *hConfig, WACOMDEVICEINFO** ppInfo,
return 0;
}
+#if WCM_XF86CONFIG
WACOMDEVICETYPE checkIfWacomDevice (XF86ConfigPtr conf, const char* pszDeviceName) {
XF86ConfInputPtr ip;
@@ -267,6 +290,7 @@ WACOMDEVICETYPE mapStringToType (const char* name)
return WACOMDEVICETYPE_UNKNOWN;
}
+#endif
WACOMDEVICE * WacomConfigOpenDevice(WACOMCONFIG * hConfig,
const char* pszDeviceName)
@@ -454,6 +478,7 @@ void WacomConfigFree(void* pvData)
free(pvData);
}
+#if WCM_XF86CONFIG
XF86ConfigPtr readConfig (char *filename)
{
XF86ConfigPtr conf = 0;
@@ -491,3 +516,4 @@ void ErrorF(const char *f, ...)
vfprintf(stderr, f, args);
va_end(args);
}
+#endif
diff --git a/src/xdrv/wcmConfig.c b/src/xdrv/wcmConfig.c
index 9cfcfca..687bb48 100755
--- a/src/xdrv/wcmConfig.c
+++ b/src/xdrv/wcmConfig.c
@@ -205,14 +205,15 @@ LocalDevicePtr xf86WcmAllocate(char* name, int flag)
common->wcmTouch = 0; /* touch is disabled */
common->wcmTouchDefault = 0; /* default to disable when touch isn't supported */
common->wcmCapacity = -1; /* Capacity is disabled */
- common->wcmCapacityDefault = 2; /* default to -1 when capacity isn't supported */
- /* 2 when capacity is supported */
+ common->wcmCapacityDefault = 3; /* default to -1 when capacity isn't supported */
+ /* 3 when capacity is supported */
common->wcmRotate = ROTATE_NONE; /* default tablet rotation to off */
common->wcmMaxX = 0; /* max digitizer logical X value */
common->wcmMaxY = 0; /* max digitizer logical Y value */
common->wcmMaxTouchX = 1024; /* max touch X value */
common->wcmMaxTouchY = 1024; /* max touch Y value */
common->wcmMaxZ = 0; /* max Z value */
+ common->wcmMaxCapacity = 0; /* max capacity value */
common->wcmMaxDist = 0; /* max distance value */
common->wcmResolX = 0; /* digitizer X resolution in points/inch */
common->wcmResolY = 0; /* digitizer Y resolution in points/inch */
@@ -377,7 +378,9 @@ static void xf86WcmUninit(InputDriverPtr drv, LocalDevicePtr local, int flags)
DBG(1, priv->debugLevel, ErrorF("xf86WcmUninit\n"));
+#ifndef WCM_UNINIT_CALLED
gWacomModule.DevProc(local->dev, DEVICE_OFF);
+#endif
/* free pressure curve */
if (priv->pPressCurve)
diff --git a/src/xdrv/wcmISDV4.c b/src/xdrv/wcmISDV4.c
index 0365527..5c086ee 100755
--- a/src/xdrv/wcmISDV4.c
+++ b/src/xdrv/wcmISDV4.c
@@ -167,14 +167,17 @@ static void isdv4InitISDV4(WacomCommonPtr common, const char* id, float version)
/* set parameters */
common->wcmProtocolLevel = 4;
common->wcmPktLength = 9; /* length of a packet
- * device packets are 9 bytes long,
- * multitouch are only 5 */
+ * device packets are 9 bytes
+ * resistive touch is 5 bytes
+ * capacitive touch is 7 bytes
+ */
/* digitizer X resolution in points/inch */
common->wcmResolX = 2540;
/* digitizer Y resolution in points/inch */
common->wcmResolY = 2540;
+ /* no touch */
common->tablet_id = 0x90;
/* tilt disabled */
@@ -223,24 +226,48 @@ static int isdv4GetRanges(LocalDevicePtr local)
{
if (data[0] & 0x41)
{
- switch (data[1])
+ /* tablet model */
+ switch (data[2] & 0x07)
{
- case 0x00: /* touch is not supported */
- common->wcmPktLength = 9;
+ case 0x00:
+ common->wcmPktLength = 5;
+ common->tablet_id = 0x93;
break;
- case 0x0C:
- common->wcmMaxTouchX = 4096;
- common->wcmMaxTouchY = 4096;
+ case 0x01:
+ common->wcmPktLength = 7;
+ common->tablet_id = 0x9A;
break;
- case 0x0E:
- common->wcmMaxTouchX = 16392;
- common->wcmMaxTouchY = 16392;
+ case 0x02:
+ common->wcmPktLength = 7;
+ common->tablet_id = 0x9F;
+ break;
+ case 0x03:
+ common->wcmPktLength = 5;
+ common->tablet_id = 0x93;
+ break;
+ case 0x04:
+ common->wcmPktLength = 7;
+ common->tablet_id = 0x9F;
break;
}
+
+ /* touch logical size */
+ common->wcmMaxTouchX = common->wcmMaxTouchY = (int)data[1];
+
+ /* Max capacity */
+ common->wcmMaxCapacity = (int)data[7];
+
+ if (common->wcmMaxCapacity)
+ common->wcmCapacityDefault = 3;
+ else
+ {
+ common->wcmCapacityDefault = -1;
+ common->wcmCapacity = -1;
+ }
}
}
- if (common->wcmMaxX && common->wcmMaxY)
+ if (common->wcmMaxX && common->wcmMaxY && common->wcmMaxTouchX)
{
char *s;
@@ -249,7 +276,6 @@ static int isdv4GetRanges(LocalDevicePtr local)
common->wcmResolX / common->wcmMaxX;
common->wcmTouchResolY = common->wcmMaxTouchY *
common->wcmResolY / common->wcmMaxY;
- common->tablet_id = 0x93;
s = xf86FindOptionValue(local->options, "Touch");
if (!s) /* touch option wasn't set in xorg.conf */
@@ -286,6 +312,17 @@ static int isdv4StartTablet(LocalDevicePtr local)
return Success;
}
+void setPktLenght(LocalDevicePtr local)
+{
+ WacomCommonPtr common = ((WacomDevicePtr)local->private)->common;
+
+ if (common->wcmMaxCapacity)
+ common->wcmPktLength = 7;
+ else
+ common->wcmPktLength = 5;
+ return;
+}
+
static int isdv4Parse(LocalDevicePtr local, const unsigned char* data)
{
WacomDevicePtr priv = (WacomDevicePtr)local->private;
@@ -300,7 +337,6 @@ static int isdv4Parse(LocalDevicePtr local, const unsigned char* data)
/* determine the type of message (touch or stylus)*/
if (data[0] & 0x18) /* not a pen */
{
-ErrorF("isdv4Parse last-prox=%d, length=%d \n", last->proximity, common->wcmPktLength);
if ((common->wcmPktLength == 9 && last->proximity ) ||
!common->wcmTouch )
{
@@ -308,7 +344,10 @@ ErrorF("isdv4Parse last-prox=%d, length=%d \n", last->proximity, common->wcmPktL
touchInProx = 0;
else
touchInProx = 1;
- return 5; /* ignore touch event */
+
+ /* ignore touch event */
+ setPktLenght(local);
+ return common->wcmPktLength;
}
else
{
@@ -316,25 +355,32 @@ ErrorF("isdv4Parse last-prox=%d, length=%d \n", last->proximity, common->wcmPktL
{
if (!touchInProx)
{
- common->wcmPktLength = 5;
+ setPktLenght(local);
channel = 1;
}
else if (!(data[0] & 0x01)) /* touch out-prox */
{
touchInProx = 0;
- common->wcmPktLength = 5;
+ setPktLenght(local);
channel = 1;
}
- else
- return 5;
+ else
+ {
+ setPktLenght(local);
+ /* ignore touch event */
+ return common->wcmPktLength;
+ }
}
else
- return 5;
+ {
+ setPktLenght(local);
+ /* ignore touch event */
+ return common->wcmPktLength;
+ }
}
}
else
{
-ErrorF("---------isdv4Parse in stylus last-stylus-prox=%d, last-touch-prox=%d, length=%d oldid %x\n", last->proximity, common->wcmChannel[1].valid.state.proximity, common->wcmPktLength, DEVICE_ID(priv->flags&0xff));
/* touch was in control */
if (common->wcmChannel[1].valid.state.proximity)
{
diff --git a/src/xdrv/wcmUSB.c b/src/xdrv/wcmUSB.c
index 17e24e9..b98b70e 100755
--- a/src/xdrv/wcmUSB.c
+++ b/src/xdrv/wcmUSB.c
@@ -427,6 +427,7 @@ static struct
{ 0x16, 2032, 2032, &usbGraphire4 }, /* Graphire4 6x8 */
{ 0x17, 2540, 2540, &usbBambooFun }, /* BambooFun 4x5 */
{ 0x18, 2540, 2540, &usbBambooFun }, /* BambooFun 6x8 */
+ { 0x19, 2032, 2032, &usbBamboo1 }, /* Bamboo1 Medium*/
{ 0x81, 2032, 2032, &usbGraphire4 }, /* Graphire4 6x8 BlueTooth */
{ 0x20, 2540, 2540, &usbIntuos }, /* Intuos 4x5 */
@@ -514,7 +515,7 @@ Bool usbWcmInit(LocalDevicePtr local, char* id, float *version)
if (common->tablet_id == 0x9A)
{
common->wcmCapacity = 0;
- common->wcmCapacityDefault = 2;
+ common->wcmCapacityDefault = 3;
}
else
{
diff --git a/src/xdrv/xf86WacomDefs.h b/src/xdrv/xf86WacomDefs.h
index e20a3b5..2878153 100755
--- a/src/xdrv/xf86WacomDefs.h
+++ b/src/xdrv/xf86WacomDefs.h
@@ -359,11 +359,12 @@ struct _WacomCommonRec
int fd_refs; /* number of references to fd; if =0, fd is invalid */
/* These values are in tablet coordinates */
- int wcmMaxX; /* tablet max X value */
- int wcmMaxY; /* tablet max Y value */
+ int wcmMaxX; /* tablet max X value */
+ int wcmMaxY; /* tablet max Y value */
int wcmMaxZ; /* tablet max Z value */
int wcmMaxTouchX; /* max touch X value */
int wcmMaxTouchY; /* max touch Y value */
+ int wcmMaxCapacity; /* max capacity value */
int wcmMaxDist; /* tablet max distance value */
int wcmTouchResolX; /* touch X resolution in points/inch */
int wcmTouchResolY; /* touch Y resolution in points/inch */
@@ -406,8 +407,8 @@ struct _WacomCommonRec
int wcmTouch; /* disable/enable touch event */
int wcmTPCButtonDefault; /* Tablet PC button default */
int wcmTouchDefault; /* default to disable when not supported */
- int wcmCapacity; /* Capacity is disabled */
- int wcmCapacityDefault; /* default to -1 when capacity isn't supported */
+ int wcmCapacity; /* disable/enable capacity */
+ int wcmCapacityDefault; /* default to -1 when capacity isn't supported/disabled */
/* 3 when capacity is supported */
int wcmMaxCursorDist; /* Max mouse distance reported so far */
int wcmCursorProxoutDist; /* Max mouse distance for proxy-out max/256 units */