[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-input-evtouch: Changes to 'upstream'



 69-touchscreen.rules |    2 
 ChangeLog            |   10 ++++
 Makefile.am          |    7 ++-
 Makefile.in          |   49 +++++++++++++++++-----
 configure            |  111 ++++++++++++++++++++++++++++++++++-----------------
 configure.ac         |   18 ++++++--
 evtouch.c            |   57 ++++++++++++++++----------
 evtouch.h            |   49 +---------------------
 libtouch.c           |   14 +++++-
 libtouch.h           |    2 
 10 files changed, 198 insertions(+), 121 deletions(-)

New commits:
commit 8e7f8ae329922dca37a4b11b1dee339c9463d01a
Author: Mattia Dongili <malattia@linux.it>
Date:   Tue Sep 11 22:01:35 2007 +0900

    Imported upstream sources (version 0.8.7)
    
    Signed-off-by: Mattia Dongili <malattia@linux.it>

diff --git a/69-touchscreen.rules b/69-touchscreen.rules
index 536c8c5..5bdaa1c 100644
--- a/69-touchscreen.rules
+++ b/69-touchscreen.rules
@@ -45,3 +45,5 @@ KERNEL=="event*", SUBSYSTEM=="input", ATTRS{idVendor}=="0637", ATTRS{idProduct}=
 KERNEL=="event*", SUBSYSTEM=="input", ATTRS{idVendor}=="0AFA", ATTRS{idProduct}=="03E8", SYMLINK+="input/evtouch_event"
 # Lifebook B-Series
 KERNEL=="event*", SUBSYSTEM=="input", ATTRS{name}=="LBPS/2 Fujitsu Lifebook TouchScreen", SYMLINK+="input/evtouch_event"
+# Elo Touchscreen
+KERNEL=="event*", SUBSYSTEM=="input", ATTRS{idVendor}=="04e7", ATTRS{idProduct}=="0020", SYMLINK+="input/evtouch_event"
diff --git a/ChangeLog b/ChangeLog
index 2cbf76f..6d41d7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+0.8.7
+	- Added Elo Touchscreen to udev-rules (Stephen Webb)
+	- Added "fix" for AMD64-crashes on touch (Martin Letenay)
+	- Fixed driver-behavior when resolution is changed using xrandr
+	  (Yura Semashko)
+	- Added stuff for installing udev-rules to /etc/... (Tuuka
+	  Pasanen)
+	- Added workaround for kernel-driver reporting ABS_Z and ABS_RX
+	  instead of ABS_X and ABS_Y (Lutz Sammer + me)
+
 0.8.6
 	- replaced old udev-rules with a more complete one (Thomas Bartosik)
 	- Added Lifebook B-series to udev-rules
diff --git a/Makefile.am b/Makefile.am
index 56dfdaa..fa3daca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-#  Copyright 2005 Tuukka Pasanen
+#  Copyright 2005-2007 Tuukka Pasanen
 #
 #  Permission is hereby granted, free of charge, to any person obtaining a
 #  copy of this software and associated documentation files (the "Software"),
@@ -22,6 +22,11 @@ EXTRA_DIST = ev_calibrate.c ev_calibrate.h evtouch.h calibrate.sh make_distrib.s
 README.calibration empty_cursor.xbm 69-touchscreen.rules
 noinst_HEADERS = libtouch.h evtouch.h ev_calibrate.h
 
+if ENABLE_UDEVINSTALL
+udevdir = @sysconfdir@/udev/rules.d
+udev_DATA = 69-touchscreen.rules
+endif
+
 if ENABLE_EVCAL
 pkglib_PROGRAMS = ev_calibrate
 pkglib_SCRIPTS = calibrate.sh
diff --git a/Makefile.in b/Makefile.in
index 5a03534..56a38af 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -14,7 +14,7 @@
 
 @SET_MAKE@
 
-#  Copyright 2005 Tuukka Pasanen
+#  Copyright 2005-2007 Tuukka Pasanen
 #
 #  Permission is hereby granted, free of charge, to any person obtaining a
 #  copy of this software and associated documentation files (the "Software"),
@@ -84,7 +84,7 @@ am__vpath_adj = case $$p in \
 am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
 am__installdirs = "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)" \
 	"$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(pkglibdir)" \
-	"$(DESTDIR)$(pkgdatadir)"
+	"$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(udevdir)"
 @DRIVER_NAME@_drv_laLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(@DRIVER_NAME@_drv_la_LTLIBRARIES)
 @DRIVER_NAME@_drv_la_LIBADD =
@@ -116,7 +116,8 @@ SOURCES = $(@DRIVER_NAME@_drv_la_SOURCES) $(ev_calibrate_SOURCES)
 DIST_SOURCES = $(@DRIVER_NAME@_drv_la_SOURCES) \
 	$(am__ev_calibrate_SOURCES_DIST)
 pkgdataDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(pkgdata_DATA)
+udevDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgdata_DATA) $(udev_DATA)
 HEADERS = $(noinst_HEADERS)
 ETAGS = etags
 CTAGS = ctags
@@ -161,6 +162,8 @@ ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 ENABLE_EVCAL_FALSE = @ENABLE_EVCAL_FALSE@
 ENABLE_EVCAL_TRUE = @ENABLE_EVCAL_TRUE@
+ENABLE_UDEVINSTALL_FALSE = @ENABLE_UDEVINSTALL_FALSE@
+ENABLE_UDEVINSTALL_TRUE = @ENABLE_UDEVINSTALL_TRUE@
 EVCALIBRATE_CFLAGS = @EVCALIBRATE_CFLAGS@
 EVCALIBRATE_LDFLAGS = @EVCALIBRATE_LDFLAGS@
 EVCALIBRATE_LIBS = @EVCALIBRATE_LIBS@
@@ -251,6 +254,8 @@ EXTRA_DIST = ev_calibrate.c ev_calibrate.h evtouch.h calibrate.sh make_distrib.s
 README.calibration empty_cursor.xbm 69-touchscreen.rules
 
 noinst_HEADERS = libtouch.h evtouch.h ev_calibrate.h
+@ENABLE_UDEVINSTALL_TRUE@udevdir = @sysconfdir@/udev/rules.d
+@ENABLE_UDEVINSTALL_TRUE@udev_DATA = 69-touchscreen.rules
 @ENABLE_EVCAL_TRUE@pkglib_SCRIPTS = calibrate.sh
 @ENABLE_EVCAL_TRUE@pkgdata_DATA = empty_cursor.xbm
 @ENABLE_EVCAL_TRUE@ev_calibrate_SOURCES = ev_calibrate.c
@@ -481,6 +486,23 @@ uninstall-pkgdataDATA:
 	  echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
 	  rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
 	done
+install-udevDATA: $(udev_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(udevdir)" || $(mkdir_p) "$(DESTDIR)$(udevdir)"
+	@list='$(udev_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(udevDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(udevdir)/$$f'"; \
+	  $(udevDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(udevdir)/$$f"; \
+	done
+
+uninstall-udevDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(udev_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(udevdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(udevdir)/$$f"; \
+	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -661,7 +683,7 @@ check: check-am
 all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \
 		$(HEADERS) config.h
 installdirs:
-	for dir in "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(pkgdatadir)"; do \
+	for dir in "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(udevdir)"; do \
 	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
 	done
 install: install-am
@@ -711,7 +733,7 @@ info: info-am
 info-am:
 
 install-data-am: install-@DRIVER_NAME@_drv_laLTLIBRARIES \
-	install-pkgdataDATA
+	install-pkgdataDATA install-udevDATA
 
 install-exec-am: install-pkglibPROGRAMS install-pkglibSCRIPTS
 
@@ -743,7 +765,8 @@ ps-am:
 
 uninstall-am: uninstall-@DRIVER_NAME@_drv_laLTLIBRARIES \
 	uninstall-info-am uninstall-pkgdataDATA \
-	uninstall-pkglibPROGRAMS uninstall-pkglibSCRIPTS
+	uninstall-pkglibPROGRAMS uninstall-pkglibSCRIPTS \
+	uninstall-udevDATA
 
 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
 	clean-@DRIVER_NAME@_drv_laLTLIBRARIES clean-generic \
@@ -756,12 +779,14 @@ uninstall-am: uninstall-@DRIVER_NAME@_drv_laLTLIBRARIES \
 	install-data install-data-am install-exec install-exec-am \
 	install-info install-info-am install-man install-pkgdataDATA \
 	install-pkglibPROGRAMS install-pkglibSCRIPTS install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags uninstall uninstall-@DRIVER_NAME@_drv_laLTLIBRARIES \
-	uninstall-am uninstall-info-am uninstall-pkgdataDATA \
-	uninstall-pkglibPROGRAMS uninstall-pkglibSCRIPTS
+	install-udevDATA installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall \
+	uninstall-@DRIVER_NAME@_drv_laLTLIBRARIES uninstall-am \
+	uninstall-info-am uninstall-pkgdataDATA \
+	uninstall-pkglibPROGRAMS uninstall-pkglibSCRIPTS \
+	uninstall-udevDATA
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/configure b/configure
index 4c8c73f..7100a67 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for xf86-input-evtouch 0.8.6.
+# Generated by GNU Autoconf 2.61 for xf86-input-evtouch 0.8.7.
 #
 # Report bugs to <http://www.conan.de/touchscreen/evtouch.html>.
 #
@@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='xf86-input-evtouch'
 PACKAGE_TARNAME='xf86-input-evtouch'
-PACKAGE_VERSION='0.8.6'
-PACKAGE_STRING='xf86-input-evtouch 0.8.6'
+PACKAGE_VERSION='0.8.7'
+PACKAGE_STRING='xf86-input-evtouch 0.8.7'
 PACKAGE_BUGREPORT='http://www.conan.de/touchscreen/evtouch.html'
 
 ac_unique_file="Makefile.am"
@@ -877,6 +877,8 @@ inputdir
 PKG_CONFIG
 XORG_CFLAGS
 XORG_LIBS
+ENABLE_UDEVINSTALL_TRUE
+ENABLE_UDEVINSTALL_FALSE
 ENABLE_EVCAL_TRUE
 ENABLE_EVCAL_FALSE
 EVCALIBRATE_CFLAGS
@@ -1409,7 +1411,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures xf86-input-evtouch 0.8.6 to adapt to many kinds of systems.
+\`configure' configures xf86-input-evtouch 0.8.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1479,7 +1481,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xf86-input-evtouch 0.8.6:";;
+     short | recursive ) echo "Configuration of xf86-input-evtouch 0.8.7:";;
    esac
   cat <<\_ACEOF
 
@@ -1495,6 +1497,8 @@ Optional Features:
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
   --disable-libtool-lock  avoid locking (might break parallel builds)
+  --enable-udevinstall    Install udev to /etc/udev/rules.d/
+                          [default=disabled]
   --enable-evcalibrate    Enable ev_calibrate build and install
                           [default=disabled]
 
@@ -1595,7 +1599,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xf86-input-evtouch configure 0.8.6
+xf86-input-evtouch configure 0.8.7
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1609,7 +1613,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by xf86-input-evtouch $as_me 0.8.6, which was
+It was created by xf86-input-evtouch $as_me 0.8.7, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2281,7 +2285,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='xf86-input-evtouch'
- VERSION='0.8.6'
+ VERSION='0.8.7'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4350,7 +4354,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 4353 "configure"' > conftest.$ac_ext
+  echo '#line 4357 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7082,11 +7086,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7085: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7089: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7089: \$? = $ac_status" >&5
+   echo "$as_me:7093: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7350,11 +7354,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7353: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7357: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7357: \$? = $ac_status" >&5
+   echo "$as_me:7361: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7454,11 +7458,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7457: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7461: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7461: \$? = $ac_status" >&5
+   echo "$as_me:7465: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9751,7 +9755,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9754 "configure"
+#line 9758 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9851,7 +9855,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9854 "configure"
+#line 9858 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12187,11 +12191,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12190: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12194: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12194: \$? = $ac_status" >&5
+   echo "$as_me:12198: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -12291,11 +12295,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12294: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12298: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12298: \$? = $ac_status" >&5
+   echo "$as_me:12302: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -13852,11 +13856,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13855: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13859: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13859: \$? = $ac_status" >&5
+   echo "$as_me:13863: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -13956,11 +13960,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13959: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13963: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13963: \$? = $ac_status" >&5
+   echo "$as_me:13967: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16143,11 +16147,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16146: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16150: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16150: \$? = $ac_status" >&5
+   echo "$as_me:16154: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -16411,11 +16415,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16414: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16418: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16418: \$? = $ac_status" >&5
+   echo "$as_me:16422: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -16515,11 +16519,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16518: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16522: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:16522: \$? = $ac_status" >&5
+   echo "$as_me:16526: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -20324,12 +20328,38 @@ echo "${ECHO_T}yes" >&6; }
 	:
 fi
 
+# Install UDEV to etc dir
+# Check whether --enable-udevinstall was given.
+if test "${enable_udevinstall+set}" = set; then
+  enableval=$enable_udevinstall; 	case "${enableval}" in
+			yes|true) enable_udevinstall=true ;;
+			no|false) enable_udevinstall=false ;;
+			*) { { echo "$as_me:$LINENO: error: Bad value ${enableval} for --enable-udevinstall" >&5
+echo "$as_me: error: Bad value ${enableval} for --enable-udevinstall" >&2;}
+   { (exit 1); exit 1; }; } ;;
+		esac
+else
+  enable_udevinstall=false
+fi
+
+
+
+
+if test "$enable_udevinstall" = "true"; then
+  ENABLE_UDEVINSTALL_TRUE=
+  ENABLE_UDEVINSTALL_FALSE='#'
+else
+  ENABLE_UDEVINSTALL_TRUE='#'
+  ENABLE_UDEVINSTALL_FALSE=
+fi
+
+
 # ev_calibrate build
 # Check whether --enable-evcalibrate was given.
 if test "${enable_evcalibrate+set}" = set; then
   enableval=$enable_evcalibrate; 	case "${enableval}" in
-			yes) enable_evcalibrate=true ;;
-			no) enable_evcalibrate=false ;;
+			yes|true) enable_evcalibrate=true ;;
+			no|false) enable_evcalibrate=false ;;
 			*) { { echo "$as_me:$LINENO: error: Bad value ${enableval} for --enable-evcalibrate" >&5
 echo "$as_me: error: Bad value ${enableval} for --enable-evcalibrate" >&2;}
    { (exit 1); exit 1; }; } ;;
@@ -20853,6 +20883,13 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${ENABLE_UDEVINSTALL_TRUE}" && test -z "${ENABLE_UDEVINSTALL_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"ENABLE_UDEVINSTALL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ENABLE_UDEVINSTALL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${ENABLE_EVCAL_TRUE}" && test -z "${ENABLE_EVCAL_FALSE}"; then
   { { echo "$as_me:$LINENO: error: conditional \"ENABLE_EVCAL\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -21160,7 +21197,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by xf86-input-evtouch $as_me 0.8.6, which was
+This file was extended by xf86-input-evtouch $as_me 0.8.7, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -21213,7 +21250,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-xf86-input-evtouch config.status 0.8.6
+xf86-input-evtouch config.status 0.8.7
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -21540,6 +21577,8 @@ inputdir!$inputdir$ac_delim
 PKG_CONFIG!$PKG_CONFIG$ac_delim
 XORG_CFLAGS!$XORG_CFLAGS$ac_delim
 XORG_LIBS!$XORG_LIBS$ac_delim
+ENABLE_UDEVINSTALL_TRUE!$ENABLE_UDEVINSTALL_TRUE$ac_delim
+ENABLE_UDEVINSTALL_FALSE!$ENABLE_UDEVINSTALL_FALSE$ac_delim
 ENABLE_EVCAL_TRUE!$ENABLE_EVCAL_TRUE$ac_delim
 ENABLE_EVCAL_FALSE!$ENABLE_EVCAL_FALSE$ac_delim
 EVCALIBRATE_CFLAGS!$EVCALIBRATE_CFLAGS$ac_delim
@@ -21551,7 +21590,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/configure.ac b/configure.ac
index d0ab57e..8d8fc48 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@
 # Process this file with autoconf to produce a configure script
 
 AC_PREREQ(2.59)
-AC_INIT([xf86-input-evtouch],[0.8.6],[http://www.conan.de/touchscreen/evtouch.html],[xf86-input-evtouch])
+AC_INIT([xf86-input-evtouch],[0.8.7],[http://www.conan.de/touchscreen/evtouch.html],[xf86-input-evtouch])
 
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_AUX_DIR(.)
@@ -52,12 +52,24 @@ AC_SUBST(inputdir)
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES)
 
+# Install UDEV to etc dir
+AC_ARG_ENABLE(udevinstall,
+	     AS_HELP_STRING(--enable-udevinstall,Install udev to /etc/udev/rules.d/ [[[default=disabled]]]),
+	     [	case "${enableval}" in
+			yes|true) enable_udevinstall=true ;;
+			no|false) enable_udevinstall=false ;;
+			*) AC_MSG_ERROR([Bad value ${enableval} for --enable-udevinstall]) ;;
+		esac],
+	     [enable_udevinstall=false])
+
+AM_CONDITIONAL(ENABLE_UDEVINSTALL, test "$enable_udevinstall" = "true")
+
 # ev_calibrate build
 AC_ARG_ENABLE(evcalibrate,
 	     AS_HELP_STRING(--enable-evcalibrate,Enable ev_calibrate build and install [[[default=disabled]]]),
 	     [	case "${enableval}" in
-			yes) enable_evcalibrate=true ;;
-			no) enable_evcalibrate=false ;;
+			yes|true) enable_evcalibrate=true ;;
+			no|false) enable_evcalibrate=false ;;
 			*) AC_MSG_ERROR([Bad value ${enableval} for --enable-evcalibrate]) ;;
 		esac],
 	     [enable_evcalibrate=false])
diff --git a/evtouch.c b/evtouch.c
index e13df06..c004846 100644
--- a/evtouch.c
+++ b/evtouch.c
@@ -50,6 +50,11 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <sys/ioctl.h>
+
+#ifndef EVIOCGRAB
+#define EVIOCGRAB _IOW('E', 0x90, int)
+#endif
 
 #define NEED_EVENTS
 #include <X11/X.h>
@@ -80,6 +85,7 @@
 
 #include "xisb.h"
 
+#include <linux/input.h>
 /*****************************************************************************
  *        Local Headers
  ****************************************************************************/
@@ -129,7 +135,7 @@ static XF86ModuleVersionInfo VersionRec =
         MODINFOSTRING1,
         MODINFOSTRING2,
         XF86_VERSION_CURRENT,
-        0, 8, 6,
+        0, 8, 7,
         ABI_CLASS_XINPUT,
         ABI_XINPUT_VERSION,
         MOD_CLASS_XINPUT,
@@ -285,12 +291,12 @@ void EVTouchProcessAbs(EVTouchPrivatePtr priv)
 
         ev = &priv->ev;
 
-        if (ev->code == ABS_X) {
+        if ( (ev->code == ABS_X) || (ev->code == ABS_Z) ) {
                 priv->cur_x = ev->value;
 		libtouchSetXPos(priv->libtouch, priv->cur_x);
 	}
 
-        if (ev->code == ABS_Y) {
+        if ( (ev->code == ABS_Y) || (ev->code == ABS_RX) ) {
                 priv->cur_y = ev->value;
 		libtouchSetYPos(priv->libtouch, priv->cur_y);
 	}
@@ -504,6 +510,10 @@ DeviceOn (DeviceIntPtr dev)
 
         xf86FlushInput(local->fd);
 
+        if (ioctl(local->fd, EVIOCGRAB, (void *)1))
+                xf86Msg(X_ERROR, "%s: Unable to grab device (%s).\n", local->name, strerror(errno));
+
+
 #ifndef XFREE86_V4
         xf86AddEnabledDevice(local);
 #else
@@ -528,6 +538,7 @@ DeviceOff (DeviceIntPtr dev)
 
         if (local->fd != -1)
         { 
+                ioctl(local->fd, EVIOCGRAB, (void *)0);
                 xf86RemoveEnabledDevice (local);
                 if (priv->buffer)
                 {
@@ -556,10 +567,10 @@ DeviceInit (DeviceIntPtr dev)
         DBGOUT(2, "EVTouch: %s\n", __FUNCTION__);
         LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate;
         EVTouchPrivatePtr priv = (EVTouchPrivatePtr) (local->private);
-        unsigned char map[EV_MAX_BUTTONS + 1];
+        unsigned char map[EV_MAX_BUTTONS];
         int i;
 
-        for (i = 0; i <= EV_MAX_BUTTONS; i++)
+        for (i = 0; i < EV_MAX_BUTTONS; i++)
                 map[i] = i;
 
         priv->btn_count = EV_MAX_BUTTONS;
@@ -599,7 +610,7 @@ DeviceInit (DeviceIntPtr dev)
         if (InitButtonClassDeviceStruct (dev, EV_MAX_BUTTONS, map) == FALSE)
         {
                 ErrorF("Unable to allocate EVTouch touchscreen ButtonClassDeviceStruct\n");
-                return !Success;
+                return BadAlloc;
         } 
 
         DBGOUT(2, "EVTouch: %s btn_count=%d\n", __FUNCTION__, 
@@ -627,14 +638,16 @@ DeviceInit (DeviceIntPtr dev)
                 return !Success;
         }
 
-        InitValuatorAxisStruct (dev, 0, priv->min_x, priv->max_x,
-                                1024,
-                                EV_AXIS_MIN_RES /* min_res */ ,
-                                EV_AXIS_MAX_RES /* max_res */ );
-        InitValuatorAxisStruct (dev, 1, priv->min_y, priv->max_y,
-                                1024,
-                                EV_AXIS_MIN_RES /* min_res */ ,
-                                EV_AXIS_MAX_RES /* max_res */ );
+        xf86InitValuatorAxisStruct(dev, 0, priv->min_x, priv->max_x,
+                                   1024,
+                                   EV_AXIS_MIN_RES /* min_res */ ,
+                                   EV_AXIS_MAX_RES /* max_res */ );
+        xf86InitValuatorDefaults(dev, 0);
+        xf86InitValuatorAxisStruct(dev, 1, priv->min_y, priv->max_y,
+                                   1024,
+                                   EV_AXIS_MIN_RES /* min_res */ ,
+                                   EV_AXIS_MAX_RES /* max_res */ );
+        xf86InitValuatorDefaults(dev, 1);
 
         /* Initial position of pointer on screen: Centered */
         priv->cur_x=(priv->max_x - priv->min_x)/2;
@@ -654,7 +667,6 @@ DeviceInit (DeviceIntPtr dev)
                 return !Success;
         }
 
-
         /* 
          * Allocate the motion events buffer.
          */
@@ -674,8 +686,7 @@ DeviceControl (DeviceIntPtr dev,
         switch (mode)
         {
         case DEVICE_INIT:
-                DeviceInit(dev);
-                RetValue = Success;
+                RetValue = DeviceInit(dev);
                 break;
         case DEVICE_ON:
                 RetValue = DeviceOn(dev);
@@ -911,11 +922,11 @@ ConvertProc ( LocalDevicePtr local,
                 max_y = priv->max_y - priv->min_y;
 
                 if (priv->rotate == EV_ROTATE_NONE) {
-                        screen_width  = priv->phys_width;
-                        screen_height = priv->phys_height;
+                        screen_width  = pScrn->currentMode->HDisplay;
+                        screen_height = pScrn->currentMode->VDisplay;
                 } else {
-                        screen_width  = priv->phys_height;
-                        screen_height = priv->phys_width;
+                        screen_width  = pScrn->currentMode->VDisplay;
+                        screen_height = pScrn->currentMode->HDisplay;
                 }
 
 
@@ -1101,7 +1112,7 @@ EVTouchPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
                 return NULL;
         }
 
-        local->name = dev->identifier;
+        local->name = xstrdup(dev->identifier);
         local->type_name = XI_TOUCHSCREEN;
         local->device_control = DeviceControl;
         local->read_input = ReadInput;
@@ -1124,6 +1135,7 @@ EVTouchPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 
 	priv->libtouch = xcalloc(1, sizeof(LibTouchRec));
 	libtouchInit(priv->libtouch, local);
+
         priv->screen_num    = xf86SetIntOption(local->options, "ScreenNumber", 0 );
 
         priv->calibrate = xf86SetIntOption(local->options, "Calibrate", 0);
@@ -1218,6 +1230,7 @@ EVTouchPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
         xf86ProcessCommonOptions(local, local->options);
         local->flags |= XI86_CONFIGURED;
 
+        xf86CloseSerial(local->fd);
         local->fd = -1;
         return (local);
 }
diff --git a/evtouch.h b/evtouch.h
index 110855b..06d8276 100644
--- a/evtouch.h
+++ b/evtouch.h
@@ -51,48 +51,6 @@
 
 #define EV_MAX_BUTTONS        5
 
-/*
- * The event structure itself
- */
-
-struct input_event {
-	struct timeval time;
-	unsigned short type;
-	unsigned short code;
-	int value;
-};
-
-/*
- * Event types
- */
-#define EV_SYN			0x00
-#define EV_KEY			0x01
-#define EV_REL			0x02
-#define EV_ABS			0x03
-
-/*
- * Absolute axes
- */
-#define ABS_X			0x00
-#define ABS_Y			0x01
-#define ABS_WHEEL               0x08
-
-/*
- * Relative axes
- */
-
-#define REL_X			0x00
-#define REL_Y			0x01
-#define REL_WHEEL		0x08
-
-/*
- * Buttons
- */
-#define BTN_LEFT		0x110
-#define BTN_RIGHT		0x111
-#define BTN_MIDDLE              0x112
-#define BTN_TOUCH		0x14a
-
 #define TOUCHED 0x01
 #define X_COORD 0x02
 #define Y_COORD 0x04
@@ -104,8 +62,8 @@ struct input_event {
 
 typedef struct _BtnActionRec
 {
-        int do_it;  // if != 0 -> commit action
-        int action; // button-press (1) or -release (0)
+        int do_it;  /* if != 0 -> commit action */
+        int action; /* button-press (1) or -release (0) */
 } BtnAction, *BtnActionPtr;
 
 typedef struct _EVTouchPrivateRec
@@ -159,7 +117,7 @@ typedef struct _EVTouchPrivateRec
         unsigned char touch_flags; /* 1 - touched, 2 - x-coord received
                                       4 - y-coord received */
         BtnActionPtr btn_actions;
-        int btn_count;    // how many buttons does the device support
+        int btn_count;    /* how many buttons does the device support */
         Bool pan_viewport;
 
         int button_number;   /* which button to report */
@@ -182,7 +140,6 @@ typedef struct _EVTouchPrivateRec
         LocalDevicePtr local;
 } EVTouchPrivateRec, *EVTouchPrivatePtr;
 
-typedef LibTouchRecPtr _EVTouchPrivateRec;
 
 /******************************************************************************
  *  Declarations
diff --git a/libtouch.c b/libtouch.c
index 12209b9..3eff483 100644
--- a/libtouch.c
+++ b/libtouch.c
@@ -23,11 +23,17 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <misc.h>
 #include <os.h>
 
 #include <xf86.h>
+#ifndef NEED_XF86_TYPES
 #define NEED_XF86_TYPES
+#endif
 #include <xf86_ansic.h>
 #include <xf86_OSproc.h>
 #include <xf86Xinput.h>
@@ -210,8 +216,9 @@ void libtouchInit(LibTouchRecPtr libtouch, LocalDevicePtr local)
 
         /* parse actions for the states */
         for (state_action_idx = 0; state_action_str[state_action_idx] != NULL; state_action_idx++) {
+                DBG(4, ErrorF("LibTouch: Finding Option %s\n",  state_action_str[state_action_idx]));
                 str = xf86FindOptionValue(local->options, state_action_str[state_action_idx]);
-                if (state_action_str == NULL)
+                if (str == NULL)
                         continue;
 
                 for (action_idx = 0; action_str[action_idx] != NULL; action_idx++) {
@@ -222,6 +229,7 @@ void libtouchInit(LibTouchRecPtr libtouch, LocalDevicePtr local)
                 }
         }
 
+
         dump_configuration();
 }
 
@@ -294,6 +302,9 @@ int delta(int x1, int x2)
 static void
 disable_timers(LibTouchRecPtr priv)
 {
+        int sigstate;
+
+        sigstate = xf86BlockSIGIO();
         if (priv->tap_timer) 
                 TimerFree(priv->tap_timer);
         priv->tap_timer = NULL;
@@ -303,6 +314,7 @@ disable_timers(LibTouchRecPtr priv)
                 TimerFree(priv->longtouch_timer);
         priv->longtouch_timer = NULL;
         priv->longtouch_timer_expired = FALSE;
+        xf86UnblockSIGIO(sigstate);
 }
 
 
diff --git a/libtouch.h b/libtouch.h
index 565009f..e7e2c73 100644
--- a/libtouch.h
+++ b/libtouch.h
@@ -62,5 +62,7 @@ void libtouchInit(LibTouchRecPtr libtouch, LocalDevicePtr local);
 
 void libtouchSetPos(LibTouchRecPtr libtouch, int x, int y);
 void libtouchTriggerSM(LibTouchRecPtr libtouch, LibTouchState_t touch);
+void libtouchSetXPos(LibTouchRecPtr libtouch, int x);
+void libtouchSetYPos(LibTouchRecPtr libtouch, int y);
 
 #endif



Reply to: