autoreconf -v --install || exit 1
cd $ORIGDIR || exit $?
-$srcdir/configure --enable-maintainer-mode "$@"
+#$srcdir/configure --enable-maintainer-mode "$@"
+++ /dev/null
-------------------------------------------------------
-Quick Guide To Patching This Package For The Impatient
-------------------------------------------------------
-
-1. Make sure you have quilt installed
-2. Unpack the package as usual with "dpkg-source -x"
-3. Run the "patch" target in debian/rules
-4. Create a new patch with "quilt new" (see quilt(1))
-5. Edit all the files you want to include in the patch with "quilt edit"
- (see quilt(1)).
-6. Write the patch with "quilt refresh" (see quilt(1))
-7. Run the "clean" target in debian/rules
-
-Alternatively, instead of using quilt directly, you can drop the patch in to
-debian/patches and add the name of the patch to debian/patches/series.
-
-------------------------------------
-Guide To The X Strike Force Packages
-------------------------------------
-
-The X Strike Force team maintains X packages in git repositories on
-git.debian.org in the pkg-xorg subdirectory. Most upstream packages
-are actually maintained in git repositories as well, so they often
-just need to be pulled into git.debian.org in a "upstream-*" branch.
-Otherwise, the upstream sources are manually installed in the Debian
-git repository.
-
-The .orig.tar.gz upstream source file could be generated this
-"upstream-*" branch in the Debian git repository but it is actually
-copied from upstream tarballs directly.
-
-Due to X.org being highly modular, packaging all X.org applications
-as their own independent packages would have created too many Debian
-packages. For this reason, some X.org applications have been grouped
-into larger packages: xutils, xutils-dev, x11-apps, x11-session-utils,
-x11-utils, x11-xfs-utils, x11-xkb-utils, x11-xserver-utils.
-Most packages, including the X.org server itself and all libraries
-and drivers are, however maintained independently.
-
-The Debian packaging is added by creating the "debian-*" git branch
-which contains the aforementioned "upstream-*" branch plus the debian/
-repository files.
-When a patch has to be applied to the Debian package, two solutions
-are involved:
-* If the patch is available in one of the upstream branches, it
- may be git'cherry-picked into the Debian repository. In this
- case, it appears directly in the .diff.gz.
-* Otherwise, the patch is added to debian/patches/ which is managed
- with quilt as documented in /usr/share/doc/quilt/README.source.
-
-quilt is actually invoked by the Debian X packaging through a larger
-set of scripts called XSFBS. XSFBS brings some other X specific
-features such as managing dependencies and conflicts due to the video
-and input driver ABIs.
-XSFBS itself is maintained in a separate repository at
- git://git.debian.org/pkg-xorg/xsfbs.git
-and it is pulled inside the other Debian X repositories when needed.
-
-The XSFBS patching system requires a build dependency on quilt. Also
-a dependency on $(STAMP_DIR)/patch has to be added to debian/rules
-so that the XSFBS patching occurs before the actual build. So the
-very first target of the build (likely the one running autoreconf)
-should depend on $(STAMP_DIR)/patch. It should also not depend on
-anything so that parallel builds are correctly supported (nothing
-should probably run while patching is being done). And finally, the
-clean target should depend on the xsfclean target so that patches
-are unapplied on clean.
-
-When the upstream sources contain some DFSG-nonfree files, they are
-listed in text files in debian/prune/ in the "debian-*" branch of
-the Debian repository. XSFBS' scripts then take care of removing
-these listed files during the build so as to generate a modified
-DFSG-free .orig.tar.gz tarball.
+++ /dev/null
-xserver-xorg-input-evdev-multitouch (2.3.2-6slp2+29) unstable; urgency=low
-
- * Fix CFLAGS in .spec file (add omitted MACRO defininitions)
- * Git: slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-6slp2+29
-
- -- Sung-Jin Park <sj76.park@samsung.com> Fri, 15 Jun 2012 14:27:31 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-6slp2+28) unstable; urgency=low
-
- * Modify to apply input transformation matrix per device
- * Git: slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-6slp2+28
-
- -- Sung-Jin Park <sj76.park@samsung.com> Fri, 01 Jun 2012 11:22:26 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-6slp2+27) unstable; urgency=low
-
- * Modify EvdevMultitouchPreInit() not to override device name
- if it's name contains "Virtual".
- * Git: slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-6slp2+27
-
- -- Sung-Jin Park <sj76.park@samsung.com> Thu, 24 May 2012 13:59:39 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-6slp2+26) unstable; urgency=low
-
- * do not install libtool files
- * Git: slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-6slp2+26
-
- -- SooChan Lim <sc1.lim@samsung.com> Fri, 18 May 2012 09:25:48 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+26) unstable; urgency=low
-
- * Add _F_SUPPORT_PREFERRED_NAME_ to assign preferred name to touchscreen device(s)
- * If _F_SUPPORT_PREFERRED_NAME_ is included in CFLAGS, original device name will be ignored.
- * If the value of "PreferredName" option is none/empty, "Touchscreen *" will be assigned as device(s) name.
- * Git: slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+26
-
- -- Sung-Jin Park <sj76.park@samsung.com> Tue, 15 May 2012 19:56:04 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+25) unstable; urgency=low
-
- * Emulate SYN_REPORT event when current slot id has been changed
- * Git: slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+25
-
- -- Sung-Jin Park <sj76.park@samsung.com> Wed, 04 Jan 2012 15:50:59 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+24) unstable; urgency=low
-
- * Add EvdevMultitouchFrameSync() and related data structures for supporting X gesture driver
- * Git: 165.213.180.234:slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+24
-
- -- Sung-Jin Park <sj76.park@samsung.com> Wed, 02 Nov 2011 17:49:35 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+23) unstable; urgency=low
-
- * Add EvdevMultitouchGetGrabInfo() to check grab status of each touch device
- * Git: 165.213.180.234:slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+23
-
- -- Sung-Jin Park <sj76.park@samsung.com> Mon, 19 Sep 2011 14:15:48 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+22) unstable; urgency=low
-
- * oal rollback
- * Git: 165.213.180.234:slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+22
-
- -- SooChan Lim <sc1.lim@samsung.com> Fri, 08 Apr 2011 13:56:36 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+21) unstable; urgency=low
-
- * Work for oal
- * Git: 165.213.180.234:slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+21
-
- -- SooChan Lim <sc1.lim@samsung.com> Tue, 05 Apr 2011 10:37:29 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+20) unstable; urgency=low
-
- * [X11R7.6] upgrade package
- * Git: 165.213.180.234:slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+20
-
- -- SooChan Lim <sc1.lim@samsung.com> Thu, 03 Mar 2011 19:37:30 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+19) unstable; urgency=low
-
- * Remove the multitouch error filtering routine from EvdevMultitouchStoreMTData()
- * Git: 165.213.180.234:slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+19
-
- -- Sung-Jin Park <sj76.park@samsung.com> Mon, 31 Jan 2011 17:30:00 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+18) unstable; urgency=low
-
- * Modify evdev multitouch driver to set the number of multitouch to be set
- properly on "MultiTouch" property
- * Git: 165.213.180.234:slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+18
-
- -- Sung-Jin Park <sj76.park@samsung.com> Wed, 26 Jan 2011 14:24:52 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+17) unstable; urgency=low
-
- * Modify evdevmultitouch.* to process events from both MT protocol A kernel
- and MT protocol B kernel
- * Git: 165.213.180.234:slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+17
-
- -- Sung-Jin Park <sj76.park@samsung.com> Thu, 23 Dec 2010 14:18:28 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+16) unstable; urgency=low
-
- * Do not call xf86AddEnabledDevice() for devices named "*subdev*"
- * Git: 165.213.180.234:slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+16
-
- -- Sung-Jin Park <sj76.park@samsung.com> Tue, 07 Dec 2010 17:31:08 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+15) unstable; urgency=low
-
- * Add a macro _F_IGNORE_TSP_RESOLUTION_ to ignore TSP resolution when
- resolution was not specified in input.conf of Xorg server
- * Git: 165.213.180.234:/git/slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+15
-
- -- Sung-Jin Park <sj76.park@samsung.com> Fri, 26 Nov 2010 22:04:49 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+14) unstable; urgency=low
-
- * Add Conflicts and Replaces info in debian/control
- * Git: 165.213.180.234:/git/slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+14
-
- -- Sung-Jin Park <sj76.park@samsung.com> Fri, 26 Nov 2010 14:53:20 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+13) unstable; urgency=low
-
- * Modify evdevmultitouch.c not to call ProcessInputEvents() when subdevices
- were being removed
- * Git: 165.213.180.234:/git/slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+13
-
- -- Sung-Jin Park <sj76.park@samsung.com> Tue, 23 Nov 2010 16:05:31 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+12) unstable; urgency=low
-
- * Add xserver-xorg-input-evdev-multitouch-dbg into debian/control
- * Modify debian/rules to strip binary except xserver-xorg-input-evdev-multitouch-dbg
- * Git: 165.213.180.234:/git/slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+12
-
- -- Sung-Jin Park <sj76.park@samsung.com> Mon, 22 Nov 2010 14:08:05 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+11) unstable; urgency=low
-
- [ Sung-Jin Park ]
- * Add --as-needed option
- * Git: 165.213.180.234:/git/slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+11
-
- -- Sung-Jin Park <sj76.park@samsung.com> Mon, 22 Nov 2010 14:08:02 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+10) unstable; urgency=low
-
- * Modify driver name from evdev to evdevmultitouch
- * Git: 165.213.180.234:/git/slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+10
-
- -- Sung-Jin Park <sj76.park@samsung.com> Wed, 10 Nov 2010 15:43:01 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+9) unstable; urgency=low
-
- * Fix a checking gab bug
- - If a touch coordinates pair increases/decreases suddenly over 100 px in x or y axis,
- the event pair will not be processed
- - There is a bug, if the jumping of the coordinates happends,
- most of the following events will not be processed either,
- until the touch is released from the touchscreen
- * Git: 165.213.180.234:/git/slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+9
-
- -- Sung-Jin Park <sj76.park@samsung.com> Wed, 10 Nov 2010 11:26:57 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+8) unstable; urgency=low
-
- * Add EvdevMultitouchSettingTimer() to set multitouch devices after
- every initialization of core evdev device
- * Git: 165.213.180.234:/git/slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+8
-
- -- Sung-Jin Park <sj76.park@samsung.com> Thu, 04 Nov 2010 22:17:32 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+7) unstable; urgency=low
-
- * Add codes for debugging multitouch event sequences from kernel driver
- * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/X11
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+7
-
- -- Sung-Jin Park <sj76.park@samsung.com> Mon, 04 Oct 2010 13:58:49 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+6) unstable; urgency=low
-
- * Do not get absinfo if "Resolution" option exists in input.conf file
- * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/X11
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+6
-
- -- Sung-Jin Park <sj76.park@samsung.com> Fri, 17 Sep 2010 11:05:57 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+5) unstable; urgency=low
-
- * Fix EvdevSwapAxes() for setting resolution properly.
- * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/X11
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+5
-
- -- Sung-Jin Park <sj76.park@samsung.com> Tue, 29 Jun 2010 15:44:41 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+4) unstable; urgency=low
-
- * Add input polling with vsync
- * Modify evdev.c to add an additional argument to NewInputDeviceRequest()
- for xserver-1.8.0
- * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/X11
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+4
-
- -- Sung-Jin Park <sj76.park@samsung.com> Mon, 10 May 2010 16:18:28 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+3) unstable; urgency=low
-
- * upload package
- * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/X11
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+3
-
- -- Sung-Jin Park <sj76.park@samsung.com> Tue, 04 May 2010 11:54:56 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+2) unstable; urgency=low
-
- * update
- * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/X11
- * Tag: xserver-xorg-input-evdev-multitouch_2.3.2-5slp2+2
-
- -- Sung-Jin Park <sj76.park@samsung.com> Mon, 03 May 2010 19:06:52 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5slp2+1) unstable; urgency=low
-
- * Change revision
-
- -- Sung-Jin Park <sj76.park@samsung.com> Thu, 25 Mar 2010 18:14:29 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-5) unstable; urgency=low
-
- * Add EvdevSwapAxes() function for adjusting touch screen size properly
- when screen is rotated with xrandr extension
- (Adjust absinfo of max_x, min_x, max_y, min_y)
-
- -- Sung-Jin Park <sj76.park@samsung.com> Fri, 19 Mar 2010 16:38:02 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-4) unstable; urgency=low
-
- * Remove evdev log related to touch gap
-
- -- Sung-Jin Park <sj76.park@samsung.com> Tue, 09 Feb 2010 18:22:16 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-3) unstable; urgency=low
-
- * Add routines for applying touch screen resolution properly from options in xorg.conf
- Bug fix related to InvertX, InvertY
-
- -- Sung-Jin Park <sj76.park@samsung.com> Tue, 09 Feb 2010 09:47:05 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-2) unstable; urgency=low
-
- * Change not to strip binary
-
- -- Sung-Jin Park <sj76.park@samsung.com> Thu, 04 Feb 2010 17:03:03 +0900
-
-xserver-xorg-input-evdev-multitouch (2.3.2-1) unstable; urgency=low
-
- * Initial release
-
- -- Sung-Jin Park <sj76.park@samsung.com> Tue, 29 Sep 2009 21:04:26 +0200
+++ /dev/null
-Source: xserver-xorg-input-evdev-multitouch
-Section: x11
-Priority: optional
-Maintainer: Sung-Jin Park <sj76.park@samsung.com>
-Uploaders: Sung-Jin Park <sj76.park@samsung.com>, SooChan Lim <sc1.lim@samsung.com>
-#Uploaders: David Nusinow <dnusinow@debian.org>, Drew Parsons <dparsons@debian.org>, Julien Cristau <jcristau@debian.org>, Brice Goglin <bgoglin@debian.org>
-Build-Depends: debhelper (>= 5.0.0), pkg-config, quilt, xserver-xorg-dev (>= 1.6.99.900), x11proto-core-dev, x11proto-randr-dev, x11proto-input-dev, x11proto-kb-dev, libxkbfile-dev, dpkg-dev (>= 1.14.17), automake, libtool, xutils-dev (>= 1:7.3~1)
-Standards-Version: 3.8.3
-
-Package: xserver-xorg-input-evdev-multitouch
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${xserver}
-Provides: ${xinpdriver:Provides}
-Conflicts: xserver-xorg-input-evdev-multitouch-c210
-Replaces: xserver-xorg-input-evdev-multitouch-c210, xserver-xorg (<< 6.8.2-35)
-Description: X.Org X server -- evdev input multitouch driver
- This package provides the driver for input devices using evdev, the Linux
- kernel's event delivery mechanism. This driver allows for multiple keyboards
- and mice to be treated as separate input devices.
- .
- More information about X.Org can be found at:
- <URL:http://www.X.org>
- <URL:http://xorg.freedesktop.org>
- <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
- .
- This package is built from the X.org xf86-input-evdev driver module.
-
-Package: xserver-xorg-input-evdev-multitouch-dbg
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${xserver}, xserver-xorg-input-evdev-multitouch (=${Source-Version})
-Description: Debug package of xserver-xorg-input-evdev-multitouch
+++ /dev/null
-This package was downloaded from
-git://anongit.freedesktop.org/git/xorg/driver/xf86-input-evdev.
-Release tarballs are available at
-http://xorg.freedesktop.org/releases/individual/driver/
-
-Various copyright notices found in this driver:
-
-Copyright © 2004-2008 Red Hat, Inc.
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without
-fee, provided that the above copyright notice appear in all copies
-and that both that copyright notice and this permission notice
-appear in supporting documentation, and that the name of Red Hat
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission. Red
-Hat makes no representations about the suitability of this software
-for any purpose. It is provided "as is" without express or implied
-warranty.
-
-THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
-NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the copyright holders shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the copyright holders.
-
-Copyright © 2008 University of South Australia
-copyrights taken from xf86-input-mouse, partly valid for this driver.
-Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
-Copyright 1993 by David Dawes <dawes@xfree86.org>
-Copyright 2002 by SuSE Linux AG, Author: Egbert Eich
-Copyright 1994-2002 by The XFree86 Project, Inc.
-Copyright 2002 by Paul Elliott
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without
-fee, provided that the above copyright notice appear in all copies
-and that both that copyright notice and this permission notice
-appear in supporting documentation, and that the name of the authors
-not be used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission. The authors make no
-representations about the suitability of this software for any
-purpose. It is provided "as is" without express or implied
-warranty.
-
-THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
-NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-Copyright 2005 Adam Jackson.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-on the rights to use, copy, modify, merge, publish, distribute, sub
-license, and/or sell copies of the Software, and to permit persons to whom
-the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice (including the next
-paragraph) shall be included in all copies or substantial portions of the
-Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
-ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+++ /dev/null
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<deviceinfo version="0.2">
- <device>
- <match key="info.capabilities" contains="input.mouse">
- <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
- string="Linux">
- <merge key="input.x11_driver" type="string">evdev</merge>
- </match>
- </match>
-
- <match key="info.capabilities" contains="input.keys">
- <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
- string="Linux">
- <merge key="input.x11_driver" type="string">evdev</merge>
- </match>
- </match>
- </device>
-</deviceinfo>
+++ /dev/null
-#!/usr/bin/make -f
-# debian/rules for the Debian xserver-xorg-input-evdev-multitouch package.
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>
-# Copyright © 2005 Daniel Stone <daniel@fooishbar.org>
-# Copyright © 2005 David Nusinow <dnusinow@debian.org>
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-include debian/xsfbs/xsfbs.mk
-
-CFLAGS = -Wall -g -D_F_IGNORE_TSP_RESOLUTION_
-CFLAGS += -D_F_GESTURE_EXTENSION_
-CFLAGS += -D_F_SUPPORT_PREFERRED_NAME_
-#CFLAGS += -D_DEBUG_MT_SEQUENCE_
-LDFLAGS += -Wl,--hash-style=both -Wl,--as-needed
-ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
- NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
- MAKEFLAGS += -j$(NUMJOBS)
-endif
-
-DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
- confflags += --build=$(DEB_HOST_GNU_TYPE)
-else
- confflags += --build=$(DEB_HOST_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
-# confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
-endif
-
-# kbd_drv.a isn't phenomenally useful; kbd_drv.so more so
-confflags += --disable-static
-
-#configure: $(STAMP_DIR)/patch
-configure:
- autoreconf -vfi
- #./autogen.sh
-
-obj-$(DEB_BUILD_GNU_TYPE)/config.status: configure
- mkdir -p obj-$(DEB_BUILD_GNU_TYPE)
- cd obj-$(DEB_BUILD_GNU_TYPE) && \
- ../configure --prefix=/usr --mandir=\$${prefix}/share/man \
- --infodir=\$${prefix}/share/info $(confflags) \
- CFLAGS="$(CFLAGS)" \
- LDFLAGS="$(LDFLAGS)"
-
-build: build-stamp
-build-stamp: obj-$(DEB_BUILD_GNU_TYPE)/config.status
- dh_testdir
- cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
- >$@
-
-clean: xsfclean
- dh_testdir
- dh_testroot
- rm -f build-stamp
-
- rm -f config.cache config.log config.status
- rm -f */config.cache */config.log */config.status
- rm -f conftest* */conftest*
- rm -rf autom4te.cache */autom4te.cache
- rm -rf obj-*
- rm -f $$(find -name Makefile.in)
- rm -f compile config.guess config.sub configure depcomp install-sh
- rm -f ltmain.sh missing INSTALL aclocal.m4 ylwrap mkinstalldirs config.h.in
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
-# Build architecture-dependent files here.
-binary-arch: build install serverabi
- dh_testdir
- dh_testroot
-
- dh_installdocs
- dh_installchangelogs ChangeLog
- dh_install --sourcedir=debian/tmp --list-missing --exclude=usr/share/man/man4
- #dh_install --sourcedir=debian/tmp --list-missing --exclude=evdev_drv.la --exclude=usr/share/man/man4
-# install -d debian/xserver-xorg-input-evdev/usr/share/hal/fdi/policy/20thirdparty
-# install -m 644 debian/local/10-x11-evdev.fdi debian/xserver-xorg-input-evdev/usr/share/hal/fdi/policy/20thirdparty/
- dh_installman
- dh_link
- dh_strip --dbg-package=xserver-xorg-input-evdev-multitouch-dbg
- dh_compress
- dh_fixperms
- dh_installdeb
-# dh_shlibdeps -- --warnings=6
- dh_shlibdeps --
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-# Build architecture-independent files here.
-binary-indep: build install
-# Nothing to do
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+++ /dev/null
-version=3
-http://xorg.freedesktop.org/releases/individual/driver/ xf86-input-evdev-(.*)\.tar\.gz
+++ /dev/null
-usr/lib/xorg/modules/input/*.so
+++ /dev/null
-usr/share/bug/xserver-xorg-core/script usr/share/bug/xserver-xorg-input-evdev-multitouch/script
+++ /dev/null
-debian/tmp/usr/share/man/man4/*
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-if ! [ -d debian/prune ]; then
- exit 0
-fi
-
-if [ "x$1" != x--upstream-version ]; then
- exit 1
-fi
-
-version="$2"
-filename="$3"
-
-if [ -z "$version" ] || ! [ -f "$filename" ]; then
- exit 1
-fi
-
-dir="$(pwd)"
-tempdir="$(mktemp -d)"
-
-cd "$tempdir"
-tar xf "$dir/$filename"
-cat "$dir"/debian/prune/* | while read file; do rm -f */$file; done
-
-tar czf "$dir/$filename" *
-cd "$dir"
-rm -rf "$tempdir"
-echo "Done pruning upstream tarball"
-
-exit 0
+++ /dev/null
-#!/usr/bin/make -f
-
-# Debian X Strike Force Build System (XSFBS): Make portion
-
-# Copyright 1996 Stephen Early
-# Copyright 1997 Mark Eichin
-# Copyright 1998-2005, 2007 Branden Robinson
-# Copyright 2005 David Nusinow
-#
-# Licensed under the GNU General Public License, version 2. See the file
-# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
-
-# Originally by Stephen Early <sde1000@debian.org>
-# Modified by Mark W. Eichin <eichin@kitten.gen.ma.us>
-# Modified by Adam Heath <doogie@debian.org>
-# Modified by Branden Robinson <branden@debian.org>
-# Modified by Fabio Massimo Di Nitto <fabbione@fabbione.net>
-# Modified by David Nusinow <dnusinow@debian.org>
-# Acknowledgements to Manoj Srivastava.
-
-# Pass $(DH_OPTIONS) into the environment for debhelper's benefit.
-export DH_OPTIONS
-
-# force quilt to not use ~/.quiltrc and to use debian/patches
-QUILT = QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null
-
-# Set up parameters for the upstream build environment.
-
-# Determine (source) package name from Debian changelog.
-SOURCE_NAME:=$(shell dpkg-parsechangelog -ldebian/changelog \
- | grep '^Source:' | awk '{print $$2}')
-
-# Determine package version from Debian changelog.
-SOURCE_VERSION:=$(shell dpkg-parsechangelog -ldebian/changelog \
- | grep '^Version:' | awk '{print $$2}')
-
-# Determine upstream version number.
-UPSTREAM_VERSION:=$(shell echo $(SOURCE_VERSION) | sed 's/-.*//')
-
-# Determine the source version without the epoch for make-orig-tar-gz
-NO_EPOCH_VER:=$(shell echo $(UPSTREAM_VERSION) | sed 's/^.://')
-
-# Figure out who's building this package.
-BUILDER:=$(shell echo $${DEBEMAIL:-$${EMAIL:-$$(echo $$LOGNAME@$$(cat /etc/mailname 2>/dev/null))}})
-
-# Find out if this is an official build; an official build has nothing but
-# digits, dots, and/or the codename of a release in the Debian part of the
-# version number. Anything else indicates an unofficial build.
-OFFICIAL_BUILD:=$(shell VERSION=$(SOURCE_VERSION); if ! expr "$$(echo $${VERSION\#\#*-} | sed 's/\(woody\|sarge\|etch\|lenny\)//g')" : ".*[^0-9.].*" >/dev/null 2>&1; then echo yes; fi)
-
-# Set up parameters for the Debian build environment.
-
-# Determine our architecture.
-BUILD_ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
-# Work around some old-time dpkg braindamage.
-BUILD_ARCH:=$(subst i486,i386,$(BUILD_ARCH))
-# The DEB_HOST_ARCH variable may be set per the Debian cross-compilation policy.
-ifdef DEB_HOST_ARCH
- ARCH:=$(DEB_HOST_ARCH)
-else
- # dpkg-cross sets the ARCH environment variable; if set, use it.
- ifdef ARCH
- ARCH:=$(ARCH)
- else
- ARCH:=$(BUILD_ARCH)
- endif
-endif
-
-# $(STAMP_DIR) houses stamp files for complex targets.
-STAMP_DIR:=stampdir
-
-# $(DEBTREEDIR) is where all install rules are told (via $(DESTDIR)) to place
-# their files.
-DEBTREEDIR:=$(CURDIR)/debian/tmp
-
-# All "important" targets have four lines:
-# 1) A target name that is invoked by a package-building tool or the user.
-# This consists of a dependency on a "$(STAMP_DIR)/"-prefixed counterpart.
-# 2) A line delcaring 1) as a phony target (".PHONY:").
-# 3) A "$(STAMP_DIR)/"-prefixed target which does the actual work, and may
-# depend on other targets.
-# 4) A line declaring 3) as a member of the $(stampdir_targets) variable; the
-# "$(STAMP_DIR)/" prefix is omitted.
-#
-# This indirection is needed so that the "stamp" files that signify when a rule
-# is done can be located in a separate "stampdir". Recall that make has no way
-# to know when a goal has been met for a phony target (like "build" or
-# "install").
-#
-# At the end of each "$(STAMP_DIR)/" target, be sure to run the command ">$@"
-# so that the target will not be run again. Removing the file will make Make
-# run the target over.
-
-# All phony targets should be declared as dependencies of .PHONY, even if they
-# do not have "($STAMP_DIR)/"-prefixed counterparts.
-
-# Define a harmless default rule to keep things from going nuts by accident.
-.PHONY: default
-default:
-
-# Set up the $(STAMP_DIR) directory.
-.PHONY: stampdir
-stampdir_targets+=stampdir
-stampdir: $(STAMP_DIR)/stampdir
-$(STAMP_DIR)/stampdir:
- mkdir $(STAMP_DIR)
- >$@
-
-# Set up the package build directory as quilt expects to find it.
-.PHONY: prepare
-stampdir_targets+=prepare
-prepare: $(STAMP_DIR)/prepare
-$(STAMP_DIR)/prepare: $(STAMP_DIR)/log $(STAMP_DIR)/genscripts
- >$@
-
-.PHONY: log
-stampdir_targets+=log
-log: $(STAMP_DIR)/log
-$(STAMP_DIR)/log: $(STAMP_DIR)/stampdir
- mkdir -p $(STAMP_DIR)/log
-
-# Apply all patches to the upstream source.
-.PHONY: patch
-stampdir_targets+=patch
-patch: $(STAMP_DIR)/patch
-$(STAMP_DIR)/patch: $(STAMP_DIR)/prepare
- if ! [ `which quilt` ]; then \
- echo "Couldn't find quilt. Please install it or add it to the build-depends for this package."; \
- exit 1; \
- fi; \
- if $(QUILT) next >/dev/null 2>&1; then \
- echo -n "Applying patches..."; \
- if $(QUILT) push -a -v >$(STAMP_DIR)/log/patch 2>&1; then \
- cat $(STAMP_DIR)/log/patch; \
- echo "successful."; \
- else \
- cat $(STAMP_DIR)/log/patch; \
- echo "failed! (check $(STAMP_DIR)/log/patch for details)"; \
- exit 1; \
- fi; \
- else \
- echo "No patches to apply"; \
- fi; \
- >$@
-
-# Revert all patches to the upstream source.
-.PHONY: unpatch
-unpatch: $(STAMP_DIR)/log
- rm -f $(STAMP_DIR)/patch
- @echo -n "Unapplying patches..."; \
- if $(QUILT) applied >/dev/null 2>/dev/null; then \
- if $(QUILT) pop -a -v >$(STAMP_DIR)/log/unpatch 2>&1; then \
- cat $(STAMP_DIR)/log/unpatch; \
- echo "successful."; \
- else \
- cat $(STAMP_DIR)/log/unpatch; \
- echo "failed! (check $(STAMP_DIR)/log/unpatch for details)"; \
- exit 1; \
- fi; \
- else \
- echo "nothing to do."; \
- fi
-
-# Clean the generated maintainer scripts.
-.PHONY: cleanscripts
-cleanscripts:
- rm -f $(STAMP_DIR)/genscripts
- rm -f debian/*.config \
- debian/*.postinst \
- debian/*.postrm \
- debian/*.preinst \
- debian/*.prerm
-
-# Clean the package build tree.
-.PHONY: xsfclean
-xsfclean: cleanscripts unpatch
- dh_testdir
- rm -rf .pc
- rm -rf $(STAMP_DIR) $(SOURCE_DIR)
- rm -rf imports
- dh_clean debian/shlibs.local \
- debian/po/pothead
-
-# Generate the debconf templates POT file header.
-debian/po/pothead: debian/po/pothead.in
- sed -e 's/SOURCE_VERSION/$(SOURCE_VERSION)/' \
- -e 's/DATE/$(shell date "+%F %X%z"/)' <$< >$@
-
-# Update POT and PO files.
-.PHONY: updatepo
-updatepo: debian/po/pothead
- debian/scripts/debconf-updatepo --pot-header=pothead --verbose
-
-# Remove files from the upstream source tree that we don't need, or which have
-# licensing problems. It must be run before creating the .orig.tar.gz.
-#
-# Note: This rule is for Debian package maintainers' convenience, and is not
-# needed for conventional build scenarios.
-.PHONY: prune-upstream-tree
-prune-upstream-tree:
- # Ensure we're in the correct directory.
- dh_testdir
- grep -rvh '^#' debian/prune/ | xargs --no-run-if-empty rm -rf
-
-# Verify that there are no offsets or fuzz in the patches we apply.
-#
-# Note: This rule is for Debian package maintainers' convenience, and is not
-# needed for conventional build scenarios.
-.PHONY: patch-audit
-patch-audit: prepare unpatch
- @echo -n "Auditing patches..."; \
- >$(STAMP_DIR)/log/patch; \
- FUZZY=; \
- while [ -n "$$($(QUILT) next)" ]; do \
- RESULT=$$($(QUILT) push -v | tee -a $(STAMP_DIR)/log/patch | grep ^Hunk | sed 's/^Hunk.*\(succeeded\|FAILED\).*/\1/');\
- case "$$RESULT" in \
- succeeded) \
- echo "fuzzy patch: $$($(QUILT) top)" \
- | tee -a $(STAMP_DIR)/log/$$($(QUILT) top); \
- FUZZY=yes; \
- ;; \
- FAILED) \
- echo "broken patch: $$($(QUILT) next)" \
- | tee -a $(STAMP_DIR)/log/$$($(QUILT) next); \
- exit 1; \
- ;; \
- esac; \
- done; \
- if [ -n "$$FUZZY" ]; then \
- echo "there were fuzzy patches; please fix."; \
- exit 1; \
- else \
- echo "done."; \
- fi
-
-# Generate the maintainer scripts.
-.PHONY: genscripts
-stampdir_targets+=genscripts
-genscripts: $(STAMP_DIR)/genscripts
-$(STAMP_DIR)/genscripts: $(STAMP_DIR)/stampdir
- for FILE in debian/*.config.in \
- debian/*.postinst.in \
- debian/*.postrm.in \
- debian/*.preinst.in \
- debian/*.prerm.in; do \
- if [ -e "$$FILE" ]; then \
- MAINTSCRIPT=$$(echo $$FILE | sed 's/.in$$//'); \
- sed -n '1,/^#INCLUDE_SHELL_LIB#$$/p' <$$FILE \
- | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >$$MAINTSCRIPT.tmp; \
- cat debian/xsfbs/xsfbs.sh >>$$MAINTSCRIPT.tmp; \
- sed -n '/^#INCLUDE_SHELL_LIB#$$/,$$p' <$$FILE \
- | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >>$$MAINTSCRIPT.tmp; \
- sed -e 's/@SOURCE_VERSION@/$(SOURCE_VERSION)/' \
- -e 's/@OFFICIAL_BUILD@/$(OFFICIAL_BUILD)/' \
- -e 's/@DEFAULT_DCRESOLUTIONS@/$(DEFAULT_DCRESOLUTIONS)/' \
- <$$MAINTSCRIPT.tmp >$$MAINTSCRIPT; \
- rm $$MAINTSCRIPT.tmp; \
- fi; \
- done
- # Validate syntax of generated shell scripts.
- #sh debian/scripts/validate-posix-sh debian/*.config \
- # debian/*.postinst \
- # debian/*.postrm \
- # debian/*.preinst \
- # debian/*.prerm
- >$@
-
-# Generate the shlibs.local file.
-debian/shlibs.local:
- cat debian/*.shlibs >$@
-
-SERVERMINVERS = $(shell cat /usr/share/xserver-xorg/serverminver 2>/dev/null)
-VIDEOABI = $(shell cat /usr/share/xserver-xorg/videoabiver 2>/dev/null)
-INPUTABI = $(shell cat /usr/share/xserver-xorg/inputabiver 2>/dev/null)
-SERVER_DEPENDS = xserver-xorg-core (>= $(SERVERMINVERS))
-VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI)
-INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI)
-ifeq ($(PACKAGE),)
-PACKAGE=$(shell awk '/^Package:/ { print $$2; exit }' < debian/control)
-endif
-
-.PHONY: serverabi
-serverabi: install
-ifeq ($(SERVERMINVERS),)
- @echo error: xserver-xorg-dev needs to be installed
- @exit 1
-else
- echo "xserver:Depends=$(SERVER_DEPENDS)" >> debian/$(PACKAGE).substvars
- echo "xviddriver:Provides=$(VIDDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars
- echo "xinpdriver:Provides=$(INPDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars
-endif
-
-# vim:set noet ai sts=8 sw=8 tw=0:
+++ /dev/null
-# $Id$
-
-# This is the X Strike Force shell library for X Window System package
-# maintainer scripts. It serves to define shell functions commonly used by
-# such packages, and performs some error checking necessary for proper operation
-# of those functions. By itself, it does not "do" much; the maintainer scripts
-# invoke the functions defined here to accomplish package installation and
-# removal tasks.
-
-# If you are reading this within a Debian package maintainer script (e.g.,
-# /var/lib/dpkg)info/PACKAGE.{config,preinst,postinst,prerm,postrm}), you can
-# skip past this library by scanning forward in this file to the string
-# "GOBSTOPPER".
-
-SOURCE_VERSION=@SOURCE_VERSION@
-OFFICIAL_BUILD=@OFFICIAL_BUILD@
-
-# Use special abnormal exit codes so that problems with this library are more
-# easily tracked down.
-SHELL_LIB_INTERNAL_ERROR=86
-SHELL_LIB_THROWN_ERROR=74
-SHELL_LIB_USAGE_ERROR=99
-
-# old -> new variable names
-if [ -z "$DEBUG_XORG_PACKAGE" ] && [ -n "$DEBUG_XFREE86_PACKAGE" ]; then
- DEBUG_XORG_PACKAGE="$DEBUG_XFREE86_PACKAGE"
-fi
-if [ -z "$DEBUG_XORG_DEBCONF" ] && [ -n "$DEBUG_XFREE86_DEBCONF" ]; then
- DEBUG_XORG_DEBCONF="$DEBUG_XFREE86_DEBCONF"
-fi
-
-# initial sanity checks
-if [ -z "$THIS_PACKAGE" ]; then
- cat >&2 <<EOF
-Error: package maintainer script attempted to use shell library without
-definining \$THIS_PACKAGE shell variable. Please report the package name,
-version, and the text of this error message to the Debian Bug Tracking System.
-Visit <http://www.debian.org/Bugs/Reporting> on the World Wide Web for
-instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the
-"doc-debian" package, or install the "reportbug" package and use the command of
-the same name to file a report against version $SOURCE_VERSION of this package.
-EOF
- exit $SHELL_LIB_USAGE_ERROR
-fi
-
-if [ -z "$THIS_SCRIPT" ]; then
- cat >&2 <<EOF
-Error: package maintainer script attempted to use shell library without
-definining \$THIS_SCRIPT shell variable. Please report the package name,
-version, and the text of this error message to the Debian Bug Tracking System.
-Visit <http://www.debian.org/Bugs/Reporting> on the World Wide Web for
-instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the
-"doc-debian" package, or install the "reportbug" package and use the command of
-the same name to file a report against version $SOURCE_VERSION of the
-"$THIS_PACKAGE" package.
-EOF
- exit $SHELL_LIB_USAGE_ERROR
-fi
-
-if [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
- RECONFIGURE="true"
-else
- RECONFIGURE=
-fi
-
-if ([ "$1" = "install" ] || [ "$1" = "configure" ]) && [ -z "$2" ]; then
- FIRSTINST="yes"
-fi
-
-if [ -z "$RECONFIGURE" ] && [ -z "$FIRSTINST" ]; then
- UPGRADE="yes"
-fi
-
-trap "message;\
- message \"Received signal. Aborting $THIS_PACKAGE package $THIS_SCRIPT script.\";\
- message;\
- exit 1" HUP INT QUIT TERM
-
-reject_nondigits () {
- # syntax: reject_nondigits [ operand ... ]
- #
- # scan operands (typically shell variables whose values cannot be trusted) for
- # characters other than decimal digits and barf if any are found
- while [ -n "$1" ]; do
- # does the operand contain anything but digits?
- if ! expr "$1" : "[[:digit:]]\+$" > /dev/null 2>&1; then
- # can't use die(), because it wraps message() which wraps this function
- echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_nondigits() encountered" \
- "possibly malicious garbage \"$1\"" >&2
- exit $SHELL_LIB_THROWN_ERROR
- fi
- shift
- done
-}
-
-reject_whitespace () {
- # syntax: reject_whitespace [ operand ]
- #
- # scan operand (typically a shell variable whose value cannot be trusted) for
- # whitespace characters and barf if any are found
- if [ -n "$1" ]; then
- # does the operand contain any whitespace?
- if expr "$1" : "[[:space:]]" > /dev/null 2>&1; then
- # can't use die(), because I want to avoid forward references
- echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_whitespace() encountered" \
- "possibly malicious garbage \"$1\"" >&2
- exit $SHELL_LIB_THROWN_ERROR
- fi
- fi
-}
-
-reject_unlikely_path_chars () {
- # syntax: reject_unlikely_path_chars [ operand ... ]
- #
- # scan operands (typically shell variables whose values cannot be trusted) for
- # characters unlikely to be seen in a path and which the shell might
- # interpret and barf if any are found
- while [ -n "$1" ]; do
- # does the operand contain any funny characters?
- if expr "$1" : '.*[!$&()*;<>?|].*' > /dev/null 2>&1; then
- # can't use die(), because I want to avoid forward references
- echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_unlikely_path_chars()" \
- "encountered possibly malicious garbage \"$1\"" >&2
- exit $SHELL_LIB_THROWN_ERROR
- fi
- shift
- done
-}
-
-# Query the terminal to establish a default number of columns to use for
-# displaying messages to the user. This is used only as a fallback in the
-# event the COLUMNS variable is not set. ($COLUMNS can react to SIGWINCH while
-# the script is running, and this cannot, only being calculated once.)
-DEFCOLUMNS=$(stty size 2> /dev/null | awk '{print $2}') || true
-if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" > /dev/null 2>&1; then
- DEFCOLUMNS=80
-fi
-
-message () {
- # pretty-print messages of arbitrary length
- reject_nondigits "$COLUMNS"
- echo "$*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS} >&2
-}
-
-observe () {
- # syntax: observe message ...
- #
- # issue observational message suitable for logging someday when support for
- # it exists in dpkg
- if [ -n "$DEBUG_XORG_PACKAGE" ]; then
- message "$THIS_PACKAGE $THIS_SCRIPT note: $*"
- fi
-}
-
-warn () {
- # syntax: warn message ...
- #
- # issue warning message suitable for logging someday when support for
- # it exists in dpkg; also send to standard error
- message "$THIS_PACKAGE $THIS_SCRIPT warning: $*"
-}
-
-die () {
- # syntax: die message ...
- #
- # exit script with error message
- message "$THIS_PACKAGE $THIS_SCRIPT error: $*"
- exit $SHELL_LIB_THROWN_ERROR
-}
-
-internal_error () {
- # exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message
- message "internal error: $*"
- if [ -n "$OFFICIAL_BUILD" ]; then
- message "Please report a bug in the $THIS_SCRIPT script of the" \
- "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \
- "Tracking System. Include all messages above that mention the" \
- "$THIS_PACKAGE package. Visit " \
- "<http://www.debian.org/Bugs/Reporting> on the World Wide Web for" \
- "instructions, read the file" \
- "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \
- "package, or install the reportbug package and use the command of" \
- "the same name to file a report."
- fi
- exit $SHELL_LIB_INTERNAL_ERROR
-}
-
-usage_error () {
- message "usage error: $*"
- message "Please report a bug in the $THIS_SCRIPT script of the" \
- "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \
- "Tracking System. Include all messages above that mention the" \
- "$THIS_PACKAGE package. Visit " \
- "<http://www.debian.org/Bugs/Reporting> on the World Wide Web for" \
- "instructions, read the file" \
- "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \
- "package, or install the reportbug package and use the command of" \
- "the same name to file a report."
- exit $SHELL_LIB_USAGE_ERROR
-}
-
-
-maplink () {
- # returns what symlink should point to; i.e., what the "sane" answer is
- # Keep this in sync with the debian/*.links files.
- # This is only needed for symlinks to directories.
- #
- # XXX: Most of these look wrong in the X11R7 world and need to be fixed.
- # If we've stopped using this function, fixing it might enable us to re-enable
- # it again and catch more errors.
- case "$1" in
- /etc/X11/xkb/compiled) echo /var/lib/xkb ;;
- /etc/X11/xkb/xkbcomp) echo /usr/X11R6/bin/xkbcomp ;;
- /usr/X11R6/lib/X11/app-defaults) echo /etc/X11/app-defaults ;;
- /usr/X11R6/lib/X11/fs) echo /etc/X11/fs ;;
- /usr/X11R6/lib/X11/lbxproxy) echo /etc/X11/lbxproxy ;;
- /usr/X11R6/lib/X11/proxymngr) echo /etc/X11/proxymngr ;;
- /usr/X11R6/lib/X11/rstart) echo /etc/X11/rstart ;;
- /usr/X11R6/lib/X11/twm) echo /etc/X11/twm ;;
- /usr/X11R6/lib/X11/xdm) echo /etc/X11/xdm ;;
- /usr/X11R6/lib/X11/xinit) echo /etc/X11/xinit ;;
- /usr/X11R6/lib/X11/xkb) echo /etc/X11/xkb ;;
- /usr/X11R6/lib/X11/xserver) echo /etc/X11/xserver ;;
- /usr/X11R6/lib/X11/xsm) echo /etc/X11/xsm ;;
- /usr/bin/X11) echo ../X11R6/bin ;;
- /usr/bin/rstartd) echo ../X11R6/bin/rstartd ;;
- /usr/include/X11) echo ../X11R6/include/X11 ;;
- /usr/lib/X11) echo ../X11R6/lib/X11 ;;
- *) internal_error "maplink() called with unknown path \"$1\"" ;;
- esac
-}
-
-analyze_path () {
- # given a supplied set of pathnames, break each one up by directory and do an
- # ls -dl on each component, cumulatively; i.e.
- # analyze_path /usr/X11R6/bin -> ls -dl /usr /usr/X11R6 /usr/X11R6/bin
- # Thanks to Randolph Chung for this clever hack.
-
- local f g
-
- while [ -n "$1" ]; do
- reject_whitespace "$1"
- g=
- message "Analyzing $1:"
- for f in $(echo "$1" | tr / \ ); do
- if [ -e /$g$f ]; then
- ls -dl /$g$f /$g$f.dpkg-* 2> /dev/null || true
- g=$g$f/
- else
- message "/$g$f: nonexistent; directory contents of /$g:"
- ls -l /$g
- break
- fi
- done
- shift
- done
-}
-
-find_culprits () {
- local f p dpkg_info_dir possible_culprits smoking_guns bad_packages package \
- msg
-
- reject_whitespace "$1"
- message "Searching for overlapping packages..."
- dpkg_info_dir=/var/lib/dpkg/info
- if [ -d $dpkg_info_dir ]; then
- if [ "$(echo $dpkg_info_dir/*.list)" != "$dpkg_info_dir/*.list" ]; then
- possible_culprits=$(ls -1 $dpkg_info_dir/*.list | egrep -v \
- "(xbase-clients|x11-common|xfs|xlibs)")
- if [ -n "$possible_culprits" ]; then
- smoking_guns=$(grep -l "$1" $possible_culprits || true)
- if [ -n "$smoking_guns" ]; then
- bad_packages=$(printf "\\n")
- for f in $smoking_guns; do
- # too bad you can't nest parameter expansion voodoo
- p=${f%*.list} # strip off the trailing ".list"
- package=${p##*/} # strip off the directories
- bad_packages=$(printf "%s\n%s" "$bad_packages" "$package")
- done
- msg=$(cat <<EOF
-The following packages appear to have file overlaps with the X.Org packages;
-these packages are either very old, or in violation of Debian Policy. Try
-upgrading each of these packages to the latest available version if possible:
-for example, with the command "apt-get install". If no newer version of a
-package is available, you will have to remove it; for example, with the command
-"apt-get remove". If even the latest available version of the package has
-this file overlap, please file a bug against that package with the Debian Bug
-Tracking System. You may want to refer the package maintainer to section 12.8
-of the Debian Policy manual.
-EOF
-)
- message "$msg"
- message "The overlapping packages are: $bad_packages"
- else
- message "no overlaps found."
- fi
- fi
- else
- message "cannot search; no matches for $dpkg_info_dir/*.list."
- fi
- else
- message "cannot search; $dpkg_info_dir does not exist."
- fi
-}
-
-check_symlink () {
- # syntax: check_symlink symlink
- #
- # See if specified symlink points where it is supposed to. Return 0 if it
- # does, and 1 if it does not.
- #
- # Primarily used by check_symlinks_and_warn() and check_symlinks_and_bomb().
-
- local symlink
-
- # validate arguments
- if [ $# -ne 1 ]; then
- usage_error "check_symlink() called with wrong number of arguments;" \
- "expected 1, got $#"
- exit $SHELL_LIB_USAGE_ERROR
- fi
-
- symlink="$1"
-
- if [ "$(maplink "$symlink")" = "$(readlink "$symlink")" ]; then
- return 0
- else
- return 1
- fi
-}
-
-check_symlinks_and_warn () {
- # syntax: check_symlinks_and_warn symlink ...
- #
- # For each argument, check for symlink sanity, and warn if it isn't sane.
- #
- # Call this function from a preinst script in the event $1 is "upgrade" or
- # "install".
-
- local errmsg symlink
-
- # validate arguments
- if [ $# -lt 1 ]; then
- usage_error "check_symlinks_and_warn() called with wrong number of" \
- "arguments; expected at least 1, got $#"
- exit $SHELL_LIB_USAGE_ERROR
- fi
-
- while [ -n "$1" ]; do
- symlink="$1"
- if [ -L "$symlink" ]; then
- if ! check_symlink "$symlink"; then
- observe "$symlink symbolic link points to wrong location" \
- "$(readlink "$symlink"); removing"
- rm "$symlink"
- fi
- elif [ -e "$symlink" ]; then
- errmsg="$symlink exists and is not a symbolic link; this package cannot"
- errmsg="$errmsg be installed until this"
- if [ -f "$symlink" ]; then
- errmsg="$errmsg file"
- elif [ -d "$symlink" ]; then
- errmsg="$errmsg directory"
- else
- errmsg="$errmsg thing"
- fi
- errmsg="$errmsg is removed"
- die "$errmsg"
- fi
- shift
- done
-}
-
-check_symlinks_and_bomb () {
- # syntax: check_symlinks_and_bomb symlink ...
- #
- # For each argument, check for symlink sanity, and bomb if it isn't sane.
- #
- # Call this function from a postinst script.
-
- local problem symlink
-
- # validate arguments
- if [ $# -lt 1 ]; then
- usage_error "check_symlinks_and_bomb() called with wrong number of"
- "arguments; expected at least 1, got $#"
- exit $SHELL_LIB_USAGE_ERROR
- fi
-
- while [ -n "$1" ]; do
- problem=
- symlink="$1"
- if [ -L "$symlink" ]; then
- if ! check_symlink "$symlink"; then
- problem=yes
- warn "$symlink symbolic link points to wrong location" \
- "$(readlink "$symlink")"
- fi
- elif [ -e "$symlink" ]; then
- problem=yes
- warn "$symlink is not a symbolic link"
- else
- problem=yes
- warn "$symlink symbolic link does not exist"
- fi
- if [ -n "$problem" ]; then
- analyze_path "$symlink" "$(readlink "$symlink")"
- find_culprits "$symlink"
- die "bad symbolic links on system"
- fi
- shift
- done
-}
-
-font_update () {
- # run $UPDATECMDS in $FONTDIRS
-
- local dir cmd shortcmd x_font_dir_prefix
-
- x_font_dir_prefix="/usr/share/fonts/X11"
-
- if [ -z "$UPDATECMDS" ]; then
- usage_error "font_update() called but \$UPDATECMDS not set"
- fi
- if [ -z "$FONTDIRS" ]; then
- usage_error "font_update() called but \$FONTDIRS not set"
- fi
-
- reject_unlikely_path_chars "$UPDATECMDS"
- reject_unlikely_path_chars "$FONTDIRS"
-
- for dir in $FONTDIRS; do
- if [ -d "$x_font_dir_prefix/$dir" ]; then
- for cmd in $UPDATECMDS; do
- if which "$cmd" > /dev/null 2>&1; then
- shortcmd=${cmd##*/}
- observe "running $shortcmd in $dir font directory"
- cmd_opts=
- if [ "$shortcmd" = "update-fonts-alias" ]; then
- cmd_opts=--x11r7-layout
- fi
- if [ "$shortcmd" = "update-fonts-dir" ]; then
- cmd_opts=--x11r7-layout
- fi
- if [ "$shortcmd" = "update-fonts-scale" ]; then
- cmd_opts=--x11r7-layout
- fi
- $cmd $cmd_opts $dir || warn "$cmd $cmd_opts $dir" \
- "failed; font directory data may not" \
- "be up to date"
- else
- warn "$cmd not found; not updating corresponding $dir font" \
- "directory data"
- fi
- done
- else
- warn "$dir is not a directory; not updating font directory data"
- fi
- done
-}
-
-remove_conffile_prepare () {
- # syntax: remove_conffile_prepare filename official_md5sum ...
- #
- # Check a conffile "filename" against a list of canonical MD5 checksums.
- # If the file's current MD5 checksum matches one of the "official_md5sum"
- # operands provided, then prepare the conffile for removal from the system.
- # We defer actual deletion until the package is configured so that we can
- # roll this operation back if package installation fails.
- #
- # Call this function from a preinst script in the event $1 is "upgrade" or
- # "install" and verify $2 to ensure the package is being upgraded from a
- # version (or installed over a version removed-but-not-purged) prior to the
- # one in which the conffile was obsoleted.
-
- local conffile current_checksum
-
- # validate arguments
- if [ $# -lt 2 ]; then
- usage_error "remove_conffile_prepare() called with wrong number of" \
- "arguments; expected at least 2, got $#"
- exit $SHELL_LIB_USAGE_ERROR
- fi
-
- conffile="$1"
- shift
-
- # does the conffile even exist?
- if [ -e "$conffile" ]; then
- # calculate its checksum
- current_checksum=$(md5sum < "$conffile" | sed 's/[[:space:]].*//')
- # compare it to each supplied checksum
- while [ -n "$1" ]; do
- if [ "$current_checksum" = "$1" ]; then
- # we found a match; move the confffile and stop looking
- observe "preparing obsolete conffile $conffile for removal"
- mv "$conffile" "$conffile.$THIS_PACKAGE-tmp"
- break
- fi
- shift
- done
- fi
-}
-
-remove_conffile_lookup () {
- # syntax: remove_conffile_lookup package filename
- #
- # Lookup the md5sum of a conffile in dpkg's database, and prepare for removal
- # if it matches the actual file's md5sum.
- #
- # Call this function when you would call remove_conffile_prepare but only
- # want to check against dpkg's status database instead of known checksums.
-
- local package conffile old_md5sum
-
- # validate arguments
- if [ $# -ne 2 ]; then
- usage_error "remove_conffile_lookup() called with wrong number of" \
- "arguments; expected 1, got $#"
- exit $SHELL_LIB_USAGE_ERROR
- fi
-
- package="$1"
- conffile="$2"
-
- if ! [ -e "$conffile" ]; then
- return
- fi
- old_md5sum="$(dpkg-query -W -f='${Conffiles}' "$package" | \
- awk '{ if (match($0, "^ '"$conffile"' ")) print $2}')"
- if [ -n "$old_md5sum" ]; then
- remove_conffile_prepare "$conffile" "$old_md5sum"
- fi
-}
-
-remove_conffile_commit () {
- # syntax: remove_conffile_commit filename
- #
- # Complete the removal of a conffile "filename" that has become obsolete.
- #
- # Call this function from a postinst script after having used
- # remove_conffile_prepare() in the preinst.
-
- local conffile
-
- # validate arguments
- if [ $# -ne 1 ]; then
- usage_error "remove_conffile_commit() called with wrong number of" \
- "arguments; expected 1, got $#"
- exit $SHELL_LIB_USAGE_ERROR
- fi
-
- conffile="$1"
-
- # if the temporary file created by remove_conffile_prepare() exists, remove it
- if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then
- observe "committing removal of obsolete conffile $conffile"
- rm "$conffile.$THIS_PACKAGE-tmp"
- fi
-}
-
-remove_conffile_rollback () {
- # syntax: remove_conffile_rollback filename
- #
- # Roll back the removal of a conffile "filename".
- #
- # Call this function from a postrm script in the event $1 is "abort-upgrade"
- # or "abort-install" is after having used remove_conffile_prepare() in the
- # preinst.
-
- local conffile
-
- # validate arguments
- if [ $# -ne 1 ]; then
- usage_error "remove_conffile_rollback() called with wrong number of" \
- "arguments; expected 1, got $#"
- exit $SHELL_LIB_USAGE_ERROR
- fi
-
- conffile="$1"
-
- # if the temporary file created by remove_conffile_prepare() exists, move it
- # back
- if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then
- observe "rolling back removal of obsolete conffile $conffile"
- mv "$conffile.$THIS_PACKAGE-tmp" "$conffile"
- fi
-}
-
-replace_conffile_with_symlink_prepare () {
- # syntax: replace_conffile_with_symlink_prepare oldfilename newfilename \
- # official_md5sum ...
- #
- # Check a conffile "oldfilename" against a list of canonical MD5 checksums.
- # If the file's current MD5 checksum matches one of the "official_md5sum"
- # operands provided, then prepare the conffile for removal from the system.
- # We defer actual deletion until the package is configured so that we can
- # roll this operation back if package installation fails. Otherwise copy it
- # to newfilename and let dpkg handle it through conffiles mechanism.
- #
- # Call this function from a preinst script in the event $1 is "upgrade" or
- # "install" and verify $2 to ensure the package is being upgraded from a
- # version (or installed over a version removed-but-not-purged) prior to the
- # one in which the conffile was obsoleted.
-
- local conffile current_checksum
-
- # validate arguments
- if [ $# -lt 3 ]; then
- usage_error "replace_conffile_with_symlink_prepare() called with wrong" \
- " number of arguments; expected at least 3, got $#"
- exit $SHELL_LIB_USAGE_ERROR
- fi
-
- oldconffile="$1"
- shift
- newconffile="$1"
- shift
-
- remove_conffile_prepare "$_oldconffile" "$@"
- # If $oldconffile still exists, then md5sums didn't match.
- # Copy it to new one.
- if [ -f "$oldconffile" ]; then
- cp "$oldconffile" "$newconffile"
- fi
-
-}
-
-replace_conffile_with_symlink_commit () {
- # syntax: replace_conffile_with_symlink_commit oldfilename
- #
- # Complete the removal of a conffile "oldfilename" that has been
- # replaced by a symlink.
- #
- # Call this function from a postinst script after having used
- # replace_conffile_with_symlink_prepare() in the preinst.
-
- local conffile
-
- # validate arguments
- if [ $# -ne 1 ]; then
- usage_error "replace_conffile_with_symlink_commit() called with wrong" \
- "number of arguments; expected 1, got $#"
- exit $SHELL_LIB_USAGE_ERROR
- fi
-
- conffile="$1"
-
- remove_conffile_commit "$conffile"
-}
-
-replace_conffile_with_symlink_rollback () {
- # syntax: replace_conffile_with_symlink_rollback oldfilename newfilename
- #
- # Roll back the replacing of a conffile "oldfilename" with symlink to
- # "newfilename".
- #
- # Call this function from a postrm script in the event $1 is "abort-upgrade"
- # or "abort-install" and verify $2 to ensure the package failed to upgrade
- # from a version (or install over a version removed-but-not-purged) prior
- # to the one in which the conffile was obsoleted.
- # You should have used replace_conffile_with_symlink_prepare() in the
- # preinst.
-
- local conffile
-
- # validate arguments
- if [ $# -ne 2 ]; then
- usage_error "replace_conffile_with_symlink_rollback() called with wrong" \
- "number of arguments; expected 2, got $#"
- exit $SHELL_LIB_USAGE_ERROR
- fi
-
- oldconffile="$1"
- newconffile="$2"
-
- remove_conffile_rollback "$_oldconffile"
- if [ -f "$newconffile" ]; then
- rm "$newconffile"
- fi
-}
-
-run () {
- # syntax: run command [ argument ... ]
- #
- # Run specified command with optional arguments and report its exit status.
- # Useful for commands whose exit status may be nonzero, but still acceptable,
- # or commands whose failure is not fatal to us.
- #
- # NOTE: Do *not* use this function with db_get or db_metaget commands; in
- # those cases the return value of the debconf command *must* be checked
- # before the string returned by debconf is used for anything.
-
- local retval
-
- # validate arguments
- if [ $# -lt 1 ]; then
- usage_error "run() called with wrong number of arguments; expected at" \
- "least 1, got $#"
- exit $SHELL_LIB_USAGE_ERROR
- fi
-
- "$@" || retval=$?
-
- if [ ${retval:-0} -ne 0 ]; then
- observe "command \"$*\" exited with status $retval"
- fi
-}
-
-make_symlink_sane () {
- # syntax: make_symlink_sane symlink target
- #
- # Ensure that the symbolic link symlink exists, and points to target.
- #
- # If symlink does not exist, create it and point it at target.
- #
- # If symlink exists but is not a symbolic link, back it up.
- #
- # If symlink exists, is a symbolic link, but points to the wrong location, fix
- # it.
- #
- # If symlink exists, is a symbolic link, and already points to target, do
- # nothing.
- #
- # This function wouldn't be needed if ln had an -I, --idempotent option.
-
- # Validate arguments.
- if [ $# -ne 2 ]; then
- usage_error "make_symlink_sane() called with wrong number of arguments;" \
- "expected 2, got $#"
- exit $SHELL_LIB_USAGE_ERROR
- fi
-
- # We could just use the positional parameters as-is, but that makes things
- # harder to follow.
- local symlink target
-
- symlink="$1"
- target="$2"
-
- if [ -L "$symlink" ] && [ "$(readlink "$symlink")" = "$target" ]; then
- observe "link from $symlink to $target already exists"
- else
- observe "creating symbolic link from $symlink to $target"
- mkdir -p "${target%/*}" "${symlink%/*}"
- ln -s -b -S ".dpkg-old" "$target" "$symlink"
- fi
-}
-
-migrate_dir_to_symlink () {
- # syntax: migrate_dir_to_symlink old_location new_location
- #
- # Per Debian Policy section 6.5.4, "A directory will never be replaced by a
- # symbolic link to a directory or vice versa; instead, the existing state
- # (symlink or not) will be left alone and dpkg will follow the symlink if
- # there is one."
- #
- # We have to do it ourselves.
- #
- # This function moves the contents of old_location, a directory, into
- # new_location, a directory, then makes old_location a symbolic link to
- # new_location.
- #
- # old_location need not exist, but if it does, it must be a directory (or a
- # symlink to a directory). If it is not, it is backed up. If new_location
- # exists already and is not a directory, it is backed up.
- #
- # This function should be called from a package's preinst so that other
- # packages unpacked after this one --- but before this package's postinst runs
- # --- are unpacked into new_location even if their payloads contain
- # old_location filespecs.
-
- # Validate arguments.
- if [ $# -ne 2 ]; then
- usage_error "migrate_dir_to_symlink() called with wrong number of"
- "arguments; expected 2, got $#"
- exit $SHELL_LIB_USAGE_ERROR
- fi
-
- # We could just use the positional parameters as-is, but that makes things
- # harder to follow.
- local new old
-
- old="$1"
- new="$2"
-
- # Is old location a symlink?
- if [ -L "$old" ]; then
- # Does it already point to new location?
- if [ "$(readlink "$old")" = "$new" ]; then
- # Nothing to do; migration has already been done.
- observe "migration of $old to $new already done"
- return 0
- else
- # Back it up.
- warn "backing up symbolic link $old as $old.dpkg-old"
- mv -b "$old" "$old.dpkg-old"
- fi
- fi
-
- # Does old location exist, but is not a directory?
- if [ -e "$old" ] && ! [ -d "$old" ]; then
- # Back it up.
- warn "backing up non-directory $old as $old.dpkg-old"
- mv -b "$old" "$old.dpkg-old"
- fi
-
- observe "migrating $old to $new"
-
- # Is new location a symlink?
- if [ -L "$new" ]; then
- # Does it point the wrong way, i.e., back to where we're migrating from?
- if [ "$(readlink "$new")" = "$old" ]; then
- # Get rid of it.
- observe "removing symbolic link $new which points to $old"
- rm "$new"
- else
- # Back it up.
- warn "backing up symbolic link $new as $new.dpkg-old"
- mv -b "$new" "$new.dpkg-old"
- fi
- fi
-
- # Does new location exist, but is not a directory?
- if [ -e "$new" ] && ! [ -d "$new" ]; then
- warn "backing up non-directory $new as $new.dpkg-old"
- mv -b "$new" "$new.dpkg-old"
- fi
-
- # Create new directory if it does not yet exist.
- if ! [ -e "$new" ]; then
- observe "creating $new"
- mkdir -p "$new"
- fi
-
- # Copy files in old location to new location. Back up any filenames that
- # already exist in the new location with the extension ".dpkg-old".
- observe "copying files from $old to $new"
- if ! (cd "$old" && cp -a -b -S ".dpkg-old" . "$new"); then
- die "error(s) encountered while copying files from $old to $new"
- fi
-
- # Remove files at old location.
- observe "removing $old"
- rm -r "$old"
-
- # Create symlink from old location to new location.
- make_symlink_sane "$old" "$new"
-}
-
-# vim:set ai et sw=2 ts=2 tw=80:
-
-# GOBSTOPPER: The X Strike Force shell library ends here.
/* BOOL */
#define EVDEVMULTITOUCH_PROP_SWAP_AXES "EvdevMultitouch Axes Swap"
+/* Real/fake Rotation angle of a touch device */
+/* CARD8, value range 0-3 : 0(0), 1 (90), 3(180), 2(270) */
+#define EVDEVMULTITOUCH_PROP_ROTATION_ANGLE "EvdevMultitouch Rotation Angle"
+
+/* File descriptor value of rotation device node to control TSP rotation origin */
+/* CARD32, value will be between file descriptors range */
+#define EVDEVMULTITOUCH_PROP_ROTATION_NODE "EvdevMultitouch Rotation Node"
+
#endif
#sbs-git:slp/pkgs/xorg/driver/xserver-xorg-input-evdev-multitouch xserver-xorg-input-evdev-multitouch 2.3.2 b89f300e6969a0b8cef3bbe5720ec5300baf4ad3
Name: xorg-x11-drv-evdev-multitouch
Summary: X.Org evdev multitouch input driver.
-Version: 2.3.2
+Version: 2.3.16
Release: 1
-Group: TO_BE/FILLED_IN
-License: TO BE FILLED IN
+VCS: adaptation/xorg/driver/xserver-xorg-input-evdev-multitouch#REBASE-12-ge51bbb2836008916253c638ba0dc81875d6571da
+Group: System/X Hardware Support
+License: MIT
Source0: %{name}-%{version}.tar.gz
BuildRequires: pkgconfig(xorg-macros)
BuildRequires: pkgconfig(xorg-server)
<URL:http://xorg.freedesktop.org>
<URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
.
- This package is built from the X.org xf86-input-evdev driver module.
+ This package is built from the evdev multitouch driver module.
+%package devel
+Summary: Development files for xorg evdev multitouch driver
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+This package contains xorg evdev multitouch development files
%prep
%setup -q
%build
-export CFLAGS+=" -Wall -g -D_F_IGNORE_TSP_RESOLUTION_ -D_F_SUPPORT_PREFERRED_NAME_ -D_F_GESTURE_EXTENSION_ "
+export CFLAGS+=" -Wall -g -D_F_SUPPORT_PREFERRED_NAME_ -D_F_GESTURE_EXTENSION_ "
+%if "%{?tizen_profile_name}" == "mobile"
+export CFLAGS+=" -D_ENV_MOBILE_"
+%elseif "%{?tizen_profile_name}" == "wearable"
+export CFLAGS+=" -D_F_SUPPORT_ROTATION_ANGLE_ -D_F_INVERT_XY_FOR_MULTITOUCH_ -D_F_SWAP_AXES_FOR_MULTITOUCH_ -D_ENV_WEARABLE_ "
+%endif
-%autogen --disable-static
+%autogen -i -v -f
%configure --disable-static
make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
+mkdir -p %{buildroot}/usr/share/license
+cp -af COPYING %{buildroot}/usr/share/license/%{name}
%make_install
%files
+%defattr(-,root,root,-)
+/usr/lib/xorg/modules/input/evdevmultitouch_drv.so
+/usr/share/license/%{name}
+
+%files devel
+%defattr(-,root,root,-)
/usr/include/xorg/evdevmultitouch-properties.h
/usr/lib/pkgconfig/xorg-evdev-multitouch.pc
-/usr/lib/xorg/modules/input/evdevmultitouch_drv.so
/usr/share/man/man4/evdevmultitouch.4.gz
-
if (next_num != NULL && *next_num == '\0')
next_num = NULL;
}
+
+ free(option_string);
}
/* Updates DragLock button state and fires button event messges */
pInfo->name, axis_name, option_string);
}
+ free(option_string);
/* Clean up and log what happened */
if (msg) {
#define False FALSE
#endif
+#define MAX_MT 10
+
#define POLL_DISABLE '0'
#define POLL_ENABLE '1'
#define POLL_REQUEST '2'
#define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */
#define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */
+#ifndef ABS_MT_PRESSURE
+#define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */
+#endif
+
+#ifndef ABS_MT_DISTANCE
+#define ABS_MT_DISTANCE 0x3b /* Contact hover distance */
+#endif
+
+#ifndef ABS_MT_ANGLE
+#define ABS_MT_ANGLE 0x3c /* touch angle */
+#endif
+
+#ifndef ABS_MT_PALM
+#define ABS_MT_PALM 0x3d /* palm touch */
+#endif
+
#define SYN_REPORT 0
#define SYN_CONFIG 1
#define SYN_MT_REPORT 2
"XkbLayout", "us",
NULL
};
-
#ifdef _F_GESTURE_EXTENSION_
extern void mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e);
static void EvdevMultitouchFrameSync(InputInfoPtr pInfo, MTSyncType sync);
#endif//_F_GESTURE_EXTENSION_
+extern ScreenPtr miPointerCurrentScreen(void);
static void EvdevMultitouchOff(DeviceIntPtr device);
static int EvdevMultitouchOn(DeviceIntPtr);
static int EvdevMultitouchCacheCompare(InputInfoPtr pInfo, BOOL compare);
static void EvdevMultitouchEndOfMultiTouch(InputInfoPtr pInfo,EvdevMultitouchDataMTPtr pData);
static void EvdevMultitouchSetMultitouch(InputInfoPtr pInfo, int num_multitouch);
static void EvdevMultitouchGetGrabInfo(InputInfoPtr pInfo, BOOL val);
-static void EvdevMultitouchSetResolution(InputInfoPtr pInfo, int num_resolution, int resolution[4]);
+static void EvdevMultitouchSetResolution(InputInfoPtr pInfo, int num_resolution, int width, int height);
static void EvdevMultitouchSetCalibration(InputInfoPtr pInfo, int num_calibration, int calibration[4]);
static InputInfoPtr EvdevMultitouchCreateSubDevice(InputInfoPtr pInfo, int id);
static void EvdevMultitouchDeleteSubDevice(InputInfoPtr pInfo, InputInfoPtr subdev);
static void EvdevMultitouchSwapAxes(EvdevMultitouchPtr pEvdevMultitouch);
static void EvdevMultitouchSetTransform(InputInfoPtr pInfo, int num_transform, float *tmatrix);
+#ifdef _F_SUPPORT_ROTATION_ANGLE_
+static void EvdevMultitouchSetRotationAngle(EvdevMultitouchPtr pEvdevMultitouch, int angle);
+#endif
+#ifdef _F_INVERT_XY_FOR_MULTITOUCH_
+static void EvdevMultitouchSetInvertXY(EvdevMultitouchPtr pEvdevMultitouch, BOOL* inverts);
+#endif
#ifdef HAVE_PROPERTIES
static void EvdevMultitouchInitAxesLabels(EvdevMultitouchPtr pEvdevMultitouch, int natoms, Atom *atoms);
static Atom prop_multitouch = 0;
static Atom prop_transform = 0;
static Atom prop_grabinfo = 0;
+#ifdef _F_SUPPORT_ROTATION_ANGLE_
+static Atom prop_rotation_angle = 0;
+static Atom prop_rotation_node = 0;
+#endif
#endif
int g_pressed = 0;
/* All devices the evdevmultitouch driver has allocated and knows about.
* MAXDEVICES is safe as null-terminated array, as two devices (VCP and VCK)
* cannot be used by evdevmultitouch, leaving us with a space of 2 at the end. */
-static EvdevMultitouchPtr evdevmultitouch_devices[MAXDEVICES] = {NULL};
+static EvdevMultitouchPtr evdevmultitouch_devices[MAX_MT] = {NULL,};
static size_t EvdevMultitouchCountBits(unsigned long *array, size_t nlongs)
{
static BOOL
EvdevMultitouchIsDuplicate(InputInfoPtr pInfo)
{
+ int i;
EvdevMultitouchPtr pEvdevMultitouch = pInfo->private;
- EvdevMultitouchPtr* dev = evdevmultitouch_devices;
+ EvdevMultitouchPtr dev;
if (pEvdevMultitouch->min_maj)
{
- while(*dev)
+ for(i = 0 ; i < MAX_MT ; i++)
{
- if ((*dev) != pEvdevMultitouch &&
- (*dev)->min_maj &&
- (*dev)->min_maj == pEvdevMultitouch->min_maj)
- return TRUE;
- dev++;
+ dev = evdevmultitouch_devices[i];
+ if(dev)
+ {
+ if ((dev) != pEvdevMultitouch &&
+ (dev)->min_maj &&
+ (dev)->min_maj == pEvdevMultitouch->min_maj)
+ return TRUE;
+ }
}
}
return FALSE;
static void
EvdevMultitouchAddDevice(InputInfoPtr pInfo)
{
+ int i;
EvdevMultitouchPtr pEvdevMultitouch = pInfo->private;
- EvdevMultitouchPtr* dev = evdevmultitouch_devices;
+ EvdevMultitouchPtr dev;
- while(*dev)
- dev++;
-
- *dev = pEvdevMultitouch;
+ for(i = 0 ; i < MAX_MT ; i++)
+ {
+ dev = evdevmultitouch_devices[i];
+ if(!dev)
+ {
+ evdevmultitouch_devices[i] = pEvdevMultitouch;
+ return;
+ }
+ }
}
/**
static void
EvdevMultitouchRemoveDevice(InputInfoPtr pInfo)
{
+ int i;
EvdevMultitouchPtr pEvdevMultitouch = pInfo->private;
- EvdevMultitouchPtr *dev = evdevmultitouch_devices;
- int count = 0;
+ EvdevMultitouchPtr dev;
- while(*dev)
+ for( i = 0 ; i < MAX_MT ; i++ )
{
- count++;
- if (*dev == pEvdevMultitouch)
- {
- memmove(dev, dev + 1,
- sizeof(evdevmultitouch_devices) - (count * sizeof(EvdevMultitouchPtr)));
- break;
- }
- dev++;
+ dev = evdevmultitouch_devices[i];
+ if((dev) && (dev == pEvdevMultitouch))
+ {
+ evdevmultitouch_devices[i] = NULL;
+ break;
+ }
}
}
}
/**
- *
+ *
*/
static CARD32
EvdevMultitouchSubdevTimer(OsTimerPtr timer, CARD32 time, pointer arg)
InputInfoPtr pInfo = (InputInfoPtr)arg;
EvdevMultitouchPtr pEvdevMultitouch = pInfo->private;
int i;
-
+
for (i=0;i<pEvdevMultitouch->num_multitouch;i++) {
if (pEvdevMultitouch->vals_mt[i].containsValues) {
EvdevMultitouchEndOfMultiTouch(pInfo, &(pEvdevMultitouch->vals_mt[i]));
}
}
-
+
return 0;
//return pEvdevMultitouch->timeout; /* come back in 100 ms */
}
if( n_multitouch >= 2 )
EvdevMultitouchSetMultitouch(pInfo, n_multitouch);
pEvdevMultitouch->multitouch_setting_timer = TimerSet(pEvdevMultitouch->multitouch_setting_timer, 0, 0, NULL, NULL);
-
+
return 0;
}
int tmp;
EvdevMultitouchPtr pEvdevMultitouch = pInfo->private;
pixman_vector_t p;
+ EvdevMultitouchDataMTPtr pData;
+ InputInfoPtr pSubdev;
+ EvdevMultitouchPtr pEvdevMultitouchSubdev;
*num_v = *first_v = 0;
v[0] = pixman_fixed_to_int(p.vector[0]);
v[1] = pixman_fixed_to_int(p.vector[1]);
}
+ pData = &(pEvdevMultitouch->vals_mt[0]);
+ if (!pData)
+ return;
+ pSubdev = pData->pInfo;
+ if (!pSubdev)
+ return;
+ EvdevMultitouchCopyFromData(pSubdev, pData);
+ pEvdevMultitouchSubdev = pSubdev->private;
+ v[pEvdevMultitouch->axis_map[ABS_MT_TOOL_TYPE]] = pEvdevMultitouchSubdev->vals_tools[pEvdevMultitouchSubdev->real_id];
*num_v = pEvdevMultitouch->num_vals;
*first_v = 0;
if (pEvdevMultitouch->num_multitouch)
return;
-
+
if (EvdevMultitouchMBEmuFilterEvent(pInfo, button, value))
return;
#ifdef _DEBUG_MT_SEQUENCE_
ErrorF("[AbsoluteMotionEvent] ABS_MT_POSITION_X (value=%d)\n", value);
#endif
- EvdevMultitouchFakeOmittedEvents(pInfo);
pEvdevMultitouch->abs |= ABS_MT_X_VALUE;
}
else if (ev->code == ABS_MT_POSITION_Y)
#ifdef _DEBUG_MT_SEQUENCE_
ErrorF("[AbsoluteMotionEvent] ABS_MT_POSITION_Y (value=%d)\n", value);
#endif
- EvdevMultitouchFakeOmittedEvents(pInfo);
pEvdevMultitouch->abs |= ABS_MT_Y_VALUE;
}
+ else if (ev->code == ABS_MT_TOOL_TYPE)
+ {
+ pEvdevMultitouch->abs |= ABS_VALUE;
+ pEvdevMultitouch->vals_tools[pEvdevMultitouch->current_id] = value;
+#ifdef _DEBUG_MT_SEQUENCE_
+ ErrorF("[AbsoluteMotionEvent] ABS_MT_TOOL_TYPE (current_id: %d) (value=%d)\n", pEvdevMultitouch->current_id, value);
+#endif
+ }
else
pEvdevMultitouch->abs |= ABS_VALUE;
+ if( pEvdevMultitouch->current_id < 0 )
+ {
+ pEvdevMultitouch->current_id = pEvdevMultitouch->last_slot;
+#ifdef _DEBUG_MT_SEQUENCE_
+ ErrorF("\t...Fake ABS_MT_SLOT (current_id=%d)\n", pEvdevMultitouch->current_id);
+#endif
+ }
}
else
{
}
else
pEvdevMultitouch->abs |= ABS_VALUE;
- }
+ }
}
/**
else
{
num_of_pressed -= (pData->id+1);
+ if(num_of_pressed < 0)
+ num_of_pressed = 0;
/* last finger release */
if( !num_of_pressed )
{
}
}
EvdevMultitouchProcessSyncEvent(pSubdev, ev);
-
+
}
}
if (!pData->containsValues) {
return;
}
-
+
pSubdev = pInfo;
pData->containsValues = FALSE;
EvdevMultitouchCopyFromData(pSubdev, pData);
if(pEvdevMultitouch->abs & ABS_MT_X_VALUE)
x = pEvdevMultitouch->vals[pEvdevMultitouch->axis_map[ABS_MT_POSITION_X]];
else
- x = pData->vals[pEvdevMultitouch->axis_map[ABS_X]];
-
- if(pEvdevMultitouch->abs & ABS_MT_Y_VALUE)
+ x = pData->vals[pEvdevMultitouch->axis_map[ABS_X]];
+
+ if(pEvdevMultitouch->abs & ABS_MT_Y_VALUE)
y = pEvdevMultitouch->vals[pEvdevMultitouch->axis_map[ABS_MT_POSITION_Y]];
else
y = pData->vals[pEvdevMultitouch->axis_map[ABS_Y]];
int id;
id = pEvdevMultitouch->current_id;
-
+
if (id < 0) {
EvdevMultitouchReinitPEvdevMultitouch(pInfo);
return;
{
EvdevMultitouchReinitPEvdevMultitouch(pInfo);
return;
- }
+ }
}
EvdevMultitouchStoreMTData(pInfo, &(pEvdevMultitouch->vals_mt[id]));
int num_v = 0, first_v = 0;
int v[MAX_VALUATORS];
EvdevMultitouchPtr pEvdevMultitouch = pInfo->private;
-
+
if (ev->code == SYN_MT_REPORT) {
EvdevMultitouchProcessMTSyncReport(pInfo, ev);
return;
EvdevMultitouchPostAbsoluteMotionEvents(pInfo, &num_v, &first_v, v);
EvdevMultitouchPostQueuedEvents(pInfo, &num_v, &first_v, v);
#ifdef _F_GESTURE_EXTENSION_
- if( !g_pressed )
+ if( !g_pressed && pEvdevMultitouch->last_slot == 0 )
EvdevMultitouchFrameSync(pInfo, MTOUCH_FRAME_SYNC_END);
#endif//_F_GESTURE_EXTENSION_
}
-
+
EvdevMultitouchReinitPEvdevMultitouch(pInfo);
}
char ttype[50];
char tcode[50];
char tvalue[50];
-
+
switch(type)
{
case EV_SYN:
case ABS_MT_SLOT:
scode = "ABS_MT_SLOT";
break;
+ case ABS_MT_ANGLE:
+ scode = "ABS_MT_ANGLE";
+ break;
+ case ABS_MT_PALM:
+ scode = "ABS_MT_PALM";
+ break;
}
default:
break;
}
static void
+EvdevPostFakeSyncEvent(InputInfoPtr pInfo)
+{
+ struct input_event *ev = calloc(1, sizeof(struct input_event));
+ if (!ev) return;
+ ev->type = EV_SYN;
+ ev->code = SYN_REPORT;
+ ev->value = 0;
+
+ EvdevMultitouchProcessEvent(pInfo, ev);
+}
+
+static void
EvdevMultitouchProcessEvent(InputInfoPtr pInfo, struct input_event *ev)
{
EvdevMultitouchPtr pEvdevMultitouch = pInfo->private;
-
+
switch (ev->type) {
case EV_REL:
return;
- EvdevMultitouchProcessRelativeMotionEvent(pInfo, ev);
- break;
case EV_ABS:
switch(ev->code)
{
case ABS_PRESSURE:
return;
}
-
+
if( ev->code == ABS_MT_TRACKING_ID )
{
#ifdef _DEBUG_MT_SEQUENCE_
{
pEvdevMultitouch->current_id = pEvdevMultitouch->last_slot;
}
-
+
if( 0 > ev->value )//ABS_MT_TRACKING_ID == -1
{
#ifdef _DEBUG_MT_SEQUENCE_
#endif
pEvdevMultitouch->vals[pEvdevMultitouch->axis_map[ABS_MT_TOUCH_MAJOR]] = 0;
pEvdevMultitouch->abs |= ABS_MT_TOUCH_MAJOR_VALUE;
+#ifdef _ENV_WEARABLE_
+ EvdevPostFakeSyncEvent(pInfo);
+#endif //_ENV_WEARABLE_
}
+ else
+ {
+ EvdevMultitouchFakeOmittedEvents(pInfo);
+ }
}
else
{//MT protocol A Type
EvdevMultitouchProcessTrackingIDEvent(pInfo, ev);
}
}
-
+
if (ev->code == ABS_MT_SLOT)
{
#ifdef _DEBUG_MT_SEQUENCE_
}
EvdevMultitouchProcessTrackingIDEvent(pInfo, ev);
+ pEvdevMultitouch->real_id = pEvdevMultitouch->current_id;
}
else
{
break;
case EV_KEY:
return;
- EvdevMultitouchProcessKeyEvent(pInfo, ev);
- break;
case EV_SYN:
#ifdef _DEBUG_MT_SEQUENCE_
if( ev->code == SYN_MT_REPORT )
ErrorF("[ProcessEvent] SYN_REPORT (value=%d)\n", ev->value);
#endif
EvdevMultitouchProcessSyncEvent(pInfo, ev);
+ if (g_pressed)
+ EvdevMultitouchFrameSync(pInfo, MTOUCH_FRAME_SYNC_UPDATE);
break;
}
}
GetMotionHistory,
#endif
GetMotionHistorySize(), Absolute))
+ {
+ free(atoms);
return !Success;
+ }
for (axis = ABS_X; axis <= ABS_MAX; axis++) {
int axnum = g_pEvdevMultitouch->axis_map[axis];
GetMotionHistory,
#endif
GetMotionHistorySize(), Relative))
+ {
+ free(atoms);
return !Success;
+ }
for (axis = REL_X; axis <= REL_MAX; axis++)
{
labels,
#endif
pEvdevMultitouch->btnmap))
+ {
+ free(labels);
return !Success;
+ }
free(labels);
return Success;
pEvdevMultitouch->btnmap[nbuttons++] = btn;
mapping = s;
}
+ free(mapping);
}
for (i = nbuttons; i < ArrayLength(pEvdevMultitouch->btnmap); i++)
{
xf86Msg(X_WARNING, "%s: Refusing to enable duplicate device.\n",
pInfo->name);
-
+
return !Success;
}
pEvdevMultitouch->reopen_timer = TimerSet(pEvdevMultitouch->reopen_timer, 0, 0, NULL, NULL);
xf86FlushInput(pInfo->fd);
-
+
EvdevMultitouchSetMultitouch(pInfo, pEvdevMultitouch->num_multitouch);
-
+
finish = True;
}
}
/* removing it in the list of the core device */
g_pEvdevMultitouch = pEvdevMultitouch->core_device->private;
for (i=0; i<MAX_VALUATORS_MT; ++i) {
- if (g_pEvdevMultitouch->vals_mt[i].pInfo == pInfo) {
+ if ( (&g_pEvdevMultitouch->vals_mt[i]) && (g_pEvdevMultitouch->vals_mt[i].pInfo == pInfo) ){
g_pEvdevMultitouch->vals_mt[i].pInfo = NULL;
break;
}
xf86Msg(X_INFO, "%s: Close\n", pInfo->name);
if (EvdevMultitouchIsCoreDevice(pInfo)) { // master only
//EvdevMultitouchDeleteAllSubdevices(pInfo);
-
+
if (pInfo->fd != -1) {
close(pInfo->fd);
pInfo->fd = -1;
{
int i;
EvdevMultitouchPtr pEvdevMultitouch = pInfo->private;
- size_t len;
+ int len;
+ char * res;
char name[1024] = {0};
unsigned long bitmask[NLONGS(EV_CNT)] = {0};
* Do not try to validate absinfo data since it is not expected
* to be static, always refresh it in evdevmultitouch structure.
*/
- if( !xf86CheckStrOption(pInfo->options, "Resolution", NULL) )
+ res = xf86CheckStrOption(pInfo->options, "Resolution", NULL);
+ if( !res )
{
-#ifdef _F_IGNORE_TSP_RESOLUTION_
- pEvdevMultitouch->absinfo[ABS_X].maximum = 0;
- pEvdevMultitouch->absinfo[ABS_X].minimum = 0;
- pEvdevMultitouch->absinfo[ABS_Y].maximum = 0;
- pEvdevMultitouch->absinfo[ABS_Y].minimum = 0;
-#else//_F_IGNORE_TSP_RESOLUTION_
for (i = ABS_X; i <= ABS_MAX; i++) {
if (TestBit(i, abs_bitmask)) {
len = ioctl(pInfo->fd, EVIOCGABS(i), &pEvdevMultitouch->absinfo[i]);
if (len < 0) {
xf86Msg(X_ERROR, "%s: ioctl EVIOCGABSi(%d) failed: %s\n",
pInfo->name, i, strerror(errno));
+ free(res);
goto error;
}
}
}
-#endif//_F_IGNORE_TSP_RESOLUTION_
}
+ else
+ free(res);
len = ioctl(pInfo->fd, EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask);
if (len < 0) {
}
static void
-EvdevMultitouchSetResolution(InputInfoPtr pInfo, int num_resolution, int resolution[4])
+EvdevMultitouchSetResolution(InputInfoPtr pInfo, int num_resolution, int width, int height)
+
{
EvdevMultitouchPtr pEvdevMultitouch = pInfo->private;
pEvdevMultitouch->resolution.max_y = 0;
} else if (num_resolution == 4) {
pEvdevMultitouch->flags |= EVDEVMULTITOUCH_RESOLUTION;
- pEvdevMultitouch->resolution.min_x = resolution[0];
- pEvdevMultitouch->resolution.max_x = resolution[1];
- pEvdevMultitouch->resolution.min_y = resolution[2];
- pEvdevMultitouch->resolution.max_y = resolution[3];
+ pEvdevMultitouch->resolution.min_x = 0;
+ pEvdevMultitouch->resolution.max_x = width;
+ pEvdevMultitouch->resolution.min_y = 0;
+ pEvdevMultitouch->resolution.max_y = height;
}
}
EvdevMultitouchPtr pEvdevMultitouch = pInfo->private;
int i, rc;
- if( !(pEvdevMultitouch->flags & EVDEVMULTITOUCH_MULTITOUCH) )
- {
- ErrorF("[X11][%s] Device is not a multitouch screen !(flags=%d)\n", __FUNCTION__, pEvdevMultitouch->flags);
- return;
+ if( !(pEvdevMultitouch->flags & EVDEVMULTITOUCH_MULTITOUCH) )
+ {
+ ErrorF("[X11][%s] Device is not a multitouch screen !(flags=%d)\n", __FUNCTION__, pEvdevMultitouch->flags);
+ return;
}
if (num_multitouch > MAX_VALUATORS_MT)
pEvdevMultitouch->vals_mt[i].pInfo = NULL;
}
}
-
+
pEvdevMultitouch->num_multitouch = num_multitouch;
- rc = XIChangeDeviceProperty(pInfo->dev, prop_multitouch, XA_INTEGER, 8,
+ rc = XIChangeDeviceProperty(pInfo->dev, prop_multitouch, XA_INTEGER, 8,
PropModeReplace, 1, &pEvdevMultitouch->num_multitouch, FALSE);
if (rc != Success)
ErrorF("[X11][%s] Failed to Change device property !\n", __FUNCTION__);
+
+#ifdef _F_GESTURE_EXTENSION_
+ DeviceIntPtr dev;
+ for (dev = inputInfo.devices; dev; dev = dev->next)
+ {
+ if(!strncmp(dev->name, GESTURE_DEV_NAME, sizeof(GESTURE_DEV_NAME)-1))
+ {
+ InputInfoPtr gestureInfo = dev->public.devicePrivate;
+ ErrorF("[EvdevMultitouchSetMultitouch][id:%d] find device (%s)\n", dev->id, dev->name);
+ gestureInfo->device_control(dev, DEVICE_READY);
+ break;
+ }
+ }
+#endif //_F_GESTURE_EXTENSION_
}
Bool
int rc = BadAlloc;
const char *device, *str;
int num_calibration = 0, calibration[4] = { 0, 0, 0, 0 };
- int num_resolution = 0, resolution[4] = { 0, 0, 0, 0 };
+ int num_resolution = 0;
int num_transform = 0; float tr[9];
- EvdevMultitouchPtr pEvdevMultitouch;
- char *type;
- char *name;
+ EvdevMultitouchPtr pEvdevMultitouch = NULL;
+ char *type = NULL;
+ char *name = NULL;
if(!pInfo)
{
goto error;
pInfo->private = pEvdevMultitouch;
+ memset(evdevmultitouch_devices, 0, sizeof(EvdevMultitouchPtr) * MAX_MT);
xf86CollectInputOptions(pInfo, evdevmultitouchDefaults);
xf86ProcessCommonOptions(pInfo, pInfo->options);
}
}
#endif//_F_SUPPORT_PREFERRED_NAME_
-
+
/* If Type == Object, this is a device for an object to use */
type = xf86CheckStrOption(pInfo->options, "Type", NULL);
xf86Msg(X_INFO, "%s: EvdevMultitouch Type %s found\n", pInfo->name, type);
-
+
if (type != NULL && strcmp(type, "Object") == 0) {
EvdevMultitouchPtr pCreatorEvdevMultitouch;
if (!pCreatorInfo){
+ free(type);
return Success;
}
pCreatorEvdevMultitouch = pCreatorInfo->private;
memset(pEvdevMultitouch->vals, 0, MAX_VALUATORS * sizeof(int));
memset(pEvdevMultitouch->old_vals, -1, MAX_VALUATORS * sizeof(int));
-
+
/*
* We initialize pEvdevMultitouch->tool to 1 so that device that doesn't use
* proximity will still report events.
xf86Msg(X_WARNING, "%s: device file already in use. Ignoring.\n",
pInfo->name);
close(pInfo->fd);
+ pInfo->fd = -1;
rc = BadValue;
goto error;
}
pEvdevMultitouch->invert_y = xf86SetBoolOption(pInfo->options, "InvertY", FALSE);
pEvdevMultitouch->num_multitouch = xf86SetIntOption(pInfo->options, "MultiTouch", 0);
pEvdevMultitouch->swap_axes = xf86SetBoolOption(pInfo->options, "SwapAxes", FALSE);
+#ifdef _F_SUPPORT_ROTATION_ANGLE_
+ pEvdevMultitouch->rotation_angle = xf86SetIntOption(pInfo->options, "RotationAngle", 0);
+
+ str = xf86CheckStrOption(pInfo->options, "RotationNode", NULL);
+ if (str)
+ {
+ do {
+ pEvdevMultitouch->rotation_node = open(str, O_WRONLY, 0);
+ } while (pEvdevMultitouch->rotation_node < 0 && errno == EINTR);
+ }
+ else xf86Msg(X_INFO, "%s: No rotation node exists..\n", pInfo->name);
+
+ if (pEvdevMultitouch->rotation_node < 0) {
+ xf86Msg(X_ERROR, "Unable to open evdevmultitouch rotation_node\"%s\".\n", str);
+ xf86Msg(X_ERROR, "Input rotation will be done inside evdevmultitouch driver.\n");
+ pEvdevMultitouch->rotation_node = 0;
+ }
+ if (str) free(str);
+#endif
str = xf86CheckStrOption(pInfo->options, "Calibration", NULL);
if (str) {
xf86Msg(X_ERROR,
"%s: Insufficient calibration factors (%d). Ignoring calibration\n",
pInfo->name, num_calibration);
+ free(str);
}
- str = xf86CheckStrOption(pInfo->options, "Resolution", NULL);
- if (str) {
- num_resolution = sscanf(str, "%d %d %d %d",
- &resolution[0], &resolution[1],
- &resolution[2], &resolution[3]);
- if (num_resolution == 4)
- EvdevMultitouchSetResolution(pInfo, num_resolution, resolution);
+ ScreenPtr pScreen = miPointerCurrentScreen();
+ int width = 0, height = 0;
+
+ if (pScreen)
+ {
+ xf86Msg(X_INFO, "screen width = %d\n", pScreen->width);
+ xf86Msg(X_INFO, "screen height = %d\n", pScreen->height);
+
+ if (pScreen->width > 0 && pScreen->height > 0)
+ {
+ width = pScreen->width;
+ height = pScreen->height;
+ num_resolution = NUM_RESOLUTION;
+ EvdevMultitouchSetResolution(pInfo, NUM_RESOLUTION, width, height);
+ }
else
+ {
+ EvdevMultitouchSetResolution(pInfo, num_resolution, width, height);
xf86Msg(X_ERROR,
"%s: Insufficient resolution factors (%d). Ignoring resolution\n",
pInfo->name, num_resolution);
+ }
+ }
+ else
+ {
+ xf86Msg(X_ERROR, "Fail to get current screen. Ignoring resolution\n");
}
pEvdevMultitouch->use_transform = False;
if (str) {
num_transform = sscanf(str, "%f %f %f %f %f %f %f %f %f",
&tr[0], &tr[1], &tr[2],
- &tr[3], &tr[4], &tr[5],
+ &tr[3], &tr[4], &tr[5],
&tr[6], &tr[7], &tr[8]);
if (num_transform == 9)
EvdevMultitouchSetTransform(pInfo, num_transform, tr);
"%s: Insufficient transform factors (%d). Ignoring transform\n",
pInfo->name, num_transform);
}
+ free(str);
}
/* Grabbing the event device stops in-kernel event forwarding. In other
if (EvdevMultitouchCacheCompare(pInfo, FALSE) ||
EvdevMultitouchProbe(pInfo)) {
close(pInfo->fd);
+ pInfo->fd = -1;
rc = BadValue;
goto error;
}
-
+
if ((pEvdevMultitouch->flags & EVDEVMULTITOUCH_MULTITOUCH) && !pEvdevMultitouch->num_buttons) {
/* absolute multitouch screen :
* forcing num_buttons = 1
{
pEvdevMultitouch->num_multitouch = 1;
pEvdevMultitouch->vals_mt[0].pInfo = pInfo;
+ memset(pEvdevMultitouch->vals_tools, 0, sizeof(int)*MAX_VALUATORS_MT);
}
if(pEvdevMultitouch->flags & EVDEVMULTITOUCH_RESOLUTION)
{
EvdevMultitouchSwapAxes(pEvdevMultitouch);
}
-#ifdef _F_IGNORE_TSP_RESOLUTION_
- else
- {
- pEvdevMultitouch->absinfo[ABS_X].maximum = 0;
- pEvdevMultitouch->absinfo[ABS_X].minimum = 0;
- pEvdevMultitouch->absinfo[ABS_Y].maximum = 0;
- pEvdevMultitouch->absinfo[ABS_Y].minimum = 0;
- }
-#endif//_F_IGNORE_TSP_RESOLUTION_
// register only the core device
EvdevMultitouchAddDevice(pInfo);
EvdevMultitouchDragLockPreInit(pInfo);
}
+ if (type)
+ free(type);
return Success;
error:
- if (pInfo->fd >= 0)
+ if (type)
+ free(type);
+ if ((pInfo) && (pInfo->fd >= 0))
close(pInfo->fd);
return rc;
}
EvdevMultitouchUnplug
};
-
/* Return an index value for a given button event code
* returns 0 on non-button event.
*/
unsigned int
EvdevMultitouchUtilButtonEventToButtonNumber(EvdevMultitouchPtr pEvdevMultitouch, int code)
{
- unsigned int button = 0;
-
- switch(code) {
- case BTN_LEFT:
- button = 1;
- break;
-
- case BTN_RIGHT:
- button = 3;
- break;
-
- case BTN_MIDDLE:
- button = 2;
- break;
-
- /* Treat BTN_[0-2] as LMR buttons on devices that do not advertise
- BTN_LEFT, BTN_MIDDLE, BTN_RIGHT.
- Otherwise, treat BTN_[0+n] as button 5+n.
- XXX: This causes duplicate mappings for BTN_0 + n and BTN_SIDE + n
- */
- case BTN_0:
- button = (TestBit(BTN_LEFT, pEvdevMultitouch->key_bitmask)) ? 8 : 1;
- break;
- case BTN_1:
- button = (TestBit(BTN_MIDDLE, pEvdevMultitouch->key_bitmask)) ? 9 : 2;
- break;
- case BTN_2:
- button = (TestBit(BTN_RIGHT, pEvdevMultitouch->key_bitmask)) ? 10 : 3;
- break;
-
- /* FIXME: BTN_3.. and BTN_SIDE.. have the same button mapping */
- case BTN_3:
- case BTN_4:
- case BTN_5:
- case BTN_6:
- case BTN_7:
- case BTN_8:
- case BTN_9:
- button = (code - BTN_0 + 5);
- break;
-
- case BTN_SIDE:
- case BTN_EXTRA:
- case BTN_FORWARD:
- case BTN_BACK:
- case BTN_TASK:
- button = (code - BTN_LEFT + 5);
- break;
-
- default:
- if ((code > BTN_TASK) && (code < KEY_OK)) {
- if (code < BTN_JOYSTICK) {
- if (code < BTN_MOUSE)
- button = (code - BTN_0 + 5);
- else
- button = (code - BTN_LEFT + 5);
- }
- }
+ switch (code)
+ {
+ /* Mouse buttons */
+ case BTN_LEFT:
+ return 1;
+ case BTN_MIDDLE:
+ return 2;
+ case BTN_RIGHT:
+ return 3;
+ case BTN_SIDE ... BTN_JOYSTICK - 1:
+ return 8 + code - BTN_SIDE;
+
+ /* Generic buttons */
+ case BTN_0 ... BTN_2:
+ return 1 + code - BTN_0;
+ case BTN_3 ... BTN_MOUSE - 1:
+ return 8 + code - BTN_3;
+
+ /* Tablet stylus buttons */
+ case BTN_TOUCH ... BTN_STYLUS2:
+ return 1 + code - BTN_TOUCH;
+
+ /* The rest */
+ default:
+ /* Ignore */
+ return 0;
}
-
- if (button > EVDEVMULTITOUCH_MAXBUTTONS)
- return 0;
-
- return button;
}
#ifdef HAVE_PROPERTIES
AXIS_LABEL_PROP_ABS_MISC, /* undefined */
AXIS_LABEL_PROP_ABS_MISC, /* undefined */
AXIS_LABEL_PROP_ABS_MISC, /* undefined */
- AXIS_LABEL_PROP_ABS_VOLUME /* 0x20 */
+ AXIS_LABEL_PROP_ABS_VOLUME, /* 0x20 */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MISC, /* undefined */
+ AXIS_LABEL_PROP_ABS_MT_SLOT, /* 0x2f */
+ AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR, /* 0x30 */
+ AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR, /* 0x31 */
+ AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR, /* 0x32 */
+ AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR, /* 0x33 */
+ AXIS_LABEL_PROP_ABS_MT_ORIENTATION, /* 0x34 */
+ AXIS_LABEL_PROP_ABS_MT_POSITION_X, /* 0x35 */
+ AXIS_LABEL_PROP_ABS_MT_POSITION_Y, /* 0x36 */
+ AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE, /* 0x37 */
+ AXIS_LABEL_PROP_ABS_MT_BLOB_ID, /* 0x38 */
+ AXIS_LABEL_PROP_ABS_MT_TRACKING_ID, /* 0x39 */
+ AXIS_LABEL_PROP_ABS_MT_PRESSURE, /* 0x3a */
+ AXIS_LABEL_PROP_ABS_MT_DISTANCE, /* 0x3b */
+ AXIS_LABEL_PROP_ABS_MT_ANGLE, /* 0x3c */
+ AXIS_LABEL_PROP_ABS_MT_PALM /* 0x3d */
};
static char* rel_labels[] = {
}
};
+#define MAX_BTN_LABEL_GROUP 6
+
#endif /* HAVE_LABELS */
static void EvdevMultitouchInitAxesLabels(EvdevMultitouchPtr pEvdevMultitouch, int natoms, Atom *atoms)
int group = (button % 0x100)/16;
int idx = button - ((button/16) * 16);
- if (!btn_labels[group][idx])
+ if ((group < MAX_BTN_LABEL_GROUP) && (!btn_labels[group][idx]))
continue;
atom = XIGetKnownProperty(btn_labels[group][idx]);
return;
XISetDevicePropertyDeletable(dev, prop_swap, FALSE);
-
+
+#ifdef _F_SUPPORT_ROTATION_ANGLE_
+ int rotation_angle;
+ prop_rotation_angle = MakeAtom(EVDEVMULTITOUCH_PROP_ROTATION_ANGLE,
+ strlen(EVDEVMULTITOUCH_PROP_ROTATION_ANGLE), TRUE);
+
+ rotation_angle = pEvdevMultitouch->rotation_angle;
+ rc = XIChangeDeviceProperty(dev, prop_rotation_angle, XA_INTEGER, 8,
+ PropModeReplace, 1, &rotation_angle, TRUE);
+ if (rc != Success)
+ return;
+
+ XISetDevicePropertyDeletable(dev, prop_rotation_angle, FALSE);
+
+ int rotation_node;
+ prop_rotation_node = MakeAtom(EVDEVMULTITOUCH_PROP_ROTATION_NODE,
+ strlen(EVDEVMULTITOUCH_PROP_ROTATION_NODE), TRUE);
+
+ rotation_node = pEvdevMultitouch->rotation_node;
+ rc = XIChangeDeviceProperty(dev, prop_rotation_node, XA_INTEGER, 32,
+ PropModeReplace, 1, &rotation_node, FALSE);
+ if (rc != Success)
+ return;
+
+ XISetDevicePropertyDeletable(dev, prop_rotation_node, FALSE);
+#endif
+
if (pEvdevMultitouch->flags & EVDEVMULTITOUCH_MULTITOUCH)
{
/* tracking ids for mt */
}
+static void EvdevMultitouchSetRotationAngle(EvdevMultitouchPtr pEvdevMultitouch, int angle)
+{
+ if(pEvdevMultitouch->rotation_node <= 0)
+ {
+ xf86Msg(X_INFO, "[%s] Rotation node doesn't exist. Ignored. (angle=%d)\n", __FUNCTION__, angle);
+ return;
+ }
+
+ if(pEvdevMultitouch->rotation_angle != angle)
+ {
+ {
+ int nwrite = 0;
+ char buf;
+
+ buf = (char)(angle + '0');
+
+ nwrite = write(pEvdevMultitouch->rotation_node, &buf, sizeof(buf));
+
+ if(nwrite <= 0)
+ xf86Msg(X_ERROR, "[%s] Failed to write angle(=%d) on rotation_node. (errno=%d)\n", __FUNCTION__, angle, errno);
+ else
+ xf86Msg(X_ERROR, "[%s] Succeed to write angle(=%d) on rotation_node.\n", __FUNCTION__, angle);
+ }
+
+ pEvdevMultitouch->rotation_angle = angle;
+ }
+ else
+ {
+ xf86Msg(X_INFO, "[%s] Rotation angle has not been changed. Ignored. (angle=%d)\n", __FUNCTION__, angle);
+ }
+}
+
+#ifdef _F_INVERT_XY_FOR_MULTITOUCH_
+static void EvdevMultitouchSetInvertXY(EvdevMultitouchPtr pEvdevMultitouch, BOOL* inverts)
+{
+ int i;
+ InputInfoPtr pSubInfo = NULL;
+
+ for (i=1;i<pEvdevMultitouch->num_multitouch;i++)
+ {
+ pSubInfo = pEvdevMultitouch->vals_mt[i].pInfo;
+
+ if(!pSubInfo || !pSubInfo->dev) continue;
+
+ XIChangeDeviceProperty(pSubInfo->dev, prop_invert, XA_INTEGER, 8,
+ PropModeReplace, 2,
+ &inverts[0], FALSE);
+ }
+}
+#endif
+
static void EvdevMultitouchSwapAxes(EvdevMultitouchPtr pEvdevMultitouch)
{
if(pEvdevMultitouch->swap_axes)
pEvdevMultitouch->absinfo[ABS_Y].maximum = pEvdevMultitouch->resolution.max_y;
pEvdevMultitouch->absinfo[ABS_Y].minimum = pEvdevMultitouch->resolution.min_y;
}
+
+#ifdef _F_SWAP_AXES_FOR_MULTITOUCH_
+ int i;
+ InputInfoPtr pSubInfo = NULL;
+
+ for (i=1;i<pEvdevMultitouch->num_multitouch;i++)
+ {
+ pSubInfo = pEvdevMultitouch->vals_mt[i].pInfo;
+
+ if(!pSubInfo || !pSubInfo->dev) continue;
+
+ XIChangeDeviceProperty(pSubInfo->dev, prop_swap, XA_INTEGER, 8,
+ PropModeReplace, 1, &pEvdevMultitouch->swap_axes, FALSE);
+ }
+#endif
}
static int
data = (BOOL*)val->data;
pEvdevMultitouch->invert_x = data[0];
pEvdevMultitouch->invert_y = data[1];
+#ifdef _F_INVERT_XY_FOR_MULTITOUCH_
+ EvdevMultitouchSetInvertXY(pEvdevMultitouch, data);
+#endif
}
} else if (atom == prop_reopen)
{
EvdevMultitouchGetGrabInfo(pInfo, (BOOL)data);
}
}
+#ifdef _F_SUPPORT_ROTATION_ANGLE_
+ else if (atom == prop_rotation_angle)
+ {
+ int data;
+ char cdata;
+ if (val->format != 8 || val->type != XA_INTEGER || val->size != 1)
+ return BadMatch;
+
+ if (!checkonly)
+ {
+ cdata = *((char*)val->data);
+ data = (int)cdata;
+
+ EvdevMultitouchSetRotationAngle(pEvdevMultitouch, data);
+ }
+ }
+#endif
return Success;
}
while(dummy.options)
{
new = calloc(1, sizeof(struct _InputOption));
+ if (!new) return NULL;
new->opt_name = xf86OptionName(dummy.options);
new->opt_val = xf86OptionValue(dummy.options);
if( !name )
{
+ EvdevMultitouchFreeInputOpts(input_options);
xf86DrvMsg(-1, X_ERROR, "[X11][%s] Failed to allocate memory !\n", __FUNCTION__);
return NULL;
}
typedef enum _MTSyncType
{
MTOUCH_FRAME_SYNC_END,
- MTOUCH_FRAME_SYNC_BEGIN
+ MTOUCH_FRAME_SYNC_BEGIN,
+ MTOUCH_FRAME_SYNC_UPDATE
} MTSyncType;
enum EventType
} any;
AnyEvent any_event;
};
+
+#define GESTURE_DEV_NAME "Gesture"
+/* Gesture driver will query devices information
+ * if a gesture driver's control function is called using DEVICE_READY*/
+#define DEVICE_READY 11
#endif//_F_GESTURE_EXTENSION_
#ifndef EV_CNT /* linux 2.4 kernels and earlier lack _CNT defines */
#define MAX_VALUATORS_MT 10
#define DEFAULT_TIMEOUT 100
+#define NUM_RESOLUTION 4
#define EVDEVMULTITOUCH_PROP_TRACKING_ID "EvdevMultitouch Tracking ID"
#define EVDEVMULTITOUCH_PROP_MULTITOUCH_SUBDEVICES "EvdevMultitouch MultiTouch"
#define EVDEVMULTITOUCH_PROP_TRANSFORM "EvdevMultitouch Transform Matrix"
#define EVDEVMULTITOUCH_PROP_GRABINFO "EvdevMultitouch Grab Info"
+#define EVDEVMULTITOUCH_PROP_DISTANCE "EvdevMultitouch Distance"
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 5
typedef struct {
int vals[MAX_VALUATORS];
int old_vals[MAX_VALUATORS]; /* Translate absolute inputs to relative */
EvdevMultitouchDataMTRec vals_mt[MAX_VALUATORS_MT];
+ int vals_tools[MAX_VALUATORS_MT];
+ int real_id;
int flags;
int tool;
Time timeout; /* Maximum difference between consecutive fseq values
that will allow a packet to be dropped */
-
+
OsTimerPtr subdevice_timer;
int current_id;
int num_mt;
BOOL use_transform;
struct pixman_transform inv_transform;
+ int rotation_angle;
+ int rotation_node;
+
int touch_state;
Time evtime;
InputInfoPtr core_device;
-
+
} EvdevMultitouchRec, *EvdevMultitouchPtr;
/* Event posting functions */