xf86-input-mouse-1.9.0/0000775003204500007640000000000012124442510011602 500000000000000xf86-input-mouse-1.9.0/include/0000775003204500007640000000000012124442510013225 500000000000000xf86-input-mouse-1.9.0/include/Makefile.in0000664003204500007640000003650612124442150015224 00000000000000# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINT = @LINT@ LINT_FLAGS = @LINT_FLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_MOUSE_NAME = @OS_MOUSE_NAME@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inputdir = @inputdir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ sdk_HEADERS = xf86-mouse-properties.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sdkHEADERS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-sdkHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xf86-input-mouse-1.9.0/include/xf86-mouse-properties.h0000664003204500007640000000272111760540151017440 00000000000000/* * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifndef _XF86_MOUSE_PROPERTIES_H_ #define _XF86_MOUSE_PROPERTIES_H_ /* Middle mouse button emulation */ /* BOOL */ #define MOUSE_PROP_MIDBUTTON "Mouse Middle Button Emulation" /* CARD32 */ #define MOUSE_PROP_MIDBUTTON_TIMEOUT "Mouse Middle Button Timeout" #endif /* _XF86_MOUSE_PROPERTIES_H_ */ xf86-input-mouse-1.9.0/include/Makefile.am0000664003204500007640000000004611760540151015206 00000000000000sdk_HEADERS = xf86-mouse-properties.h xf86-input-mouse-1.9.0/COPYING0000664003204500007640000001613212004412630012555 00000000000000Copyright (c) 2004-2005, 2008-2010, Oracle and/or its affiliates. All rights reserved. Copyright 2012 Red Hat, Inc. 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 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. Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. Copyright 1993 by David Dawes 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 names of copyright holders not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The copyright holders make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS 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 1998 by Kazutaka YOKOTA 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 Kazutaka YOKOTA not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Kazutaka YOKOTA makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. KAZUTAKA YOKOTA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL KAZUTAKA YOKOTA 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 (c) 1999-2003 by The XFree86 Project, Inc. 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 holder(s) and author(s) 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 holder(s) and author(s). Copyright 1997,1998 by UCHIYAMA Yasushi 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 UCHIYAMA Yasushi not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. UCHIYAMA Yasushi makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL UCHIYAMA YASUSHI 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 2001 by J. Kean Johnston 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 J. Kean Johnston not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. J. Kean Johnston makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. J. KEAN JOHNSTON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL J. KEAN JOHNSTON 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. xf86-input-mouse-1.9.0/Makefile.in0000664003204500007640000007113012124442147013577 00000000000000# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # 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. VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/xorg-mouse.pc.in $(top_srcdir)/configure COPYING \ ChangeLog INSTALL config.guess config.sub depcomp install-sh \ ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = xorg-mouse.pc CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ cscope distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best DIST_TARGETS = dist-bzip2 dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINT = @LINT@ LINT_FLAGS = @LINT_FLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_MOUSE_NAME = @OS_MOUSE_NAME@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inputdir = @inputdir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = include src man MAINTAINERCLEANFILES = ChangeLog INSTALL pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-mouse.pc # Provide an sdk location that is writable by this module DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg' all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 xorg-mouse.pc: $(top_builddir)/config.status $(srcdir)/xorg-mouse.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done cscopelist-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist-recursive cscopelist cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ cscopelist-recursive ctags-recursive install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-cscope \ clean-generic clean-libtool cscope cscopelist \ cscopelist-recursive ctags ctags-recursive dist dist-all \ dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-pkgconfigDATA \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-pkgconfigDATA .PHONY: ChangeLog INSTALL INSTALL: $(INSTALL_CMD) ChangeLog: $(CHANGELOG_CMD) dist-hook: ChangeLog INSTALL # Check source code with tools like lint & sparse @LINT_TRUE@lint: @LINT_TRUE@ (cd src && $(MAKE) $(MAKEFLAGS) lint) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xf86-input-mouse-1.9.0/missing0000755003204500007640000002370312124442147013132 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.18; # UTC # Copyright (C) 1996-2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, 'missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file 'aclocal.m4' autoconf touch file 'configure' autoheader touch file 'config.h.in' autom4te touch the output file, or create a stub one automake touch all 'Makefile.in' files bison create 'y.tab.[ch]', if possible, from existing .[ch] flex create 'lex.yy.c', if possible, from existing .c help2man touch the output file lex create 'lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create 'y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running '$TOOL --version' or '$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'acinclude.m4' or '${configure_ac}'. You might want to install the Automake and Perl packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified '${configure_ac}'. You might want to install the Autoconf and GNU m4 packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'acconfig.h' or '${configure_ac}'. You might want to install the Autoconf and GNU m4 packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'. You might want to install the Automake and Perl packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: '$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get '$1' as part of Autoconf from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: '$1' $msg. You should only need it if you modified a '.y' file. You may need the Bison package in order for those modifications to take effect. You can get Bison from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a '.l' file. You may need the Flex package in order for those modifications to take effect. You can get Flex from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the Help2man package in order for those modifications to take effect. You can get Help2man from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a '.texi' or '.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy 'make' (AIX, DU, IRIX). You might want to install the Texinfo package or the GNU make package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: '$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the 'README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing '$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: xf86-input-mouse-1.9.0/xorg-mouse.pc.in0000664003204500007640000000021312005611601014551 00000000000000sdkdir=@sdkdir@ Name: xorg-mouse Description: X.Org mouse input driver for non-evdev OS'es Version: @PACKAGE_VERSION@ Cflags: -I${sdkdir} xf86-input-mouse-1.9.0/man/0000775003204500007640000000000012124442510012355 500000000000000xf86-input-mouse-1.9.0/man/Makefile.in0000664003204500007640000003537312124442150014355 00000000000000# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. # # 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 # the rights to use, copy, modify, merge, publish, distribute, sublicense, # 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 NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS 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. # VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(drivermandir)" DATA = $(driverman_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINT = @LINT@ LINT_FLAGS = @LINT_FLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_MOUSE_NAME = @OS_MOUSE_NAME@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inputdir = @inputdir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ drivermandir = $(DRIVER_MAN_DIR) driverman_PRE = mousedrv.man driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) EXTRA_DIST = mousedrv.man CLEANFILES = $(driverman_DATA) SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man all: all-am .SUFFIXES: .SUFFIXES: .$(DRIVER_MAN_SUFFIX) .man $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(drivermandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-drivermanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-drivermanDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-drivermanDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-drivermanDATA .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xf86-input-mouse-1.9.0/man/mousedrv.man0000664003204500007640000002752111760540151014652 00000000000000.\" shorthand for double quote that works everywhere. .ds q \N'34' .TH MOUSE __drivermansuffix__ __vendorversion__ .SH NAME mouse \- __xservername__ mouse input driver .SH SYNOPSIS .nf .B "Section \*qInputDevice\*q" .BI " Identifier \*q" idevname \*q .B " Driver \*qmouse\*q" .BI " Option \*qProtocol\*q \*q" protoname \*q .BI " Option \*qDevice\*q \*q" devpath \*q \ \ ... .B EndSection .fi .SH DESCRIPTION .B mouse is an __xservername__ input driver for mice. The driver supports most available mouse types and interfaces, though the level of support for types of mice depends on the OS. .PP The .B mouse driver functions as a pointer input device. Multiple mice are supported by multiple instances of this driver. .SH SUPPORTED HARDWARE .TP USB mouse USB (Universal Serial Bus) ports are present on most modern computers. Several devices can be plugged into this bus, including mice and keyboards. Support for USB mice is platform specific. .TP PS/2 mouse The PS/2 mouse is an intelligent device and may have more than three buttons and a wheel or a roller. The PS/2 mouse is usually compatible with the original PS/2 mouse from IBM immediately after power up. The PS/2 mouse with additional features requires a specialized initialization procedure to enable these features. Without proper initialization, it behaves as though it were an ordinary two or three button mouse. .TP Serial mouse There have been numerous serial mouse models from a number of manufacturers. Despite the wide range of variations, there have been relatively few protocols (data format) with which the serial mouse talks to the host computer. The modern serial mouse conforms to the PnP COM device specification so that the host computer can automatically detect the mouse and load an appropriate driver. This driver supports this specification and can detect popular PnP serial mouse models on most platforms. .TP Bus mouse The bus mouse connects to a dedicated interface card in an expansion slot. Some older video cards, notably those from ATI, and integrated I/O cards may also have a bus mouse connector. .PP The interface type of the mouse can be determined by looking at the connector of the mouse. USB mice have a thin rectangular connector. PS/2 mice are equipped with a small, round DIN 6-pin connector. Serial mouse have a D-Sub female 9- or 25-pin connector. Bus mice have either a D-Sub male 9-pin connector or a round DIN 9-pin connector. Some mice come with adapters with which the connector can be converted to another. If you are to use such an adapter, remember that the connector at the very end of the mouse/adapter pair is what matters. .SH CONFIGURATION DETAILS .PP Depending on the X server version in use, input device options may be set in either a __xconfigfile__ file, an xorg.conf.d snippet or in the configuration files read by the Hardware Abstraction Layer (HAL) daemon, hald(1). .PP Please refer to __xconfigfile__(__filemansuffix__) for general configuration details and for options that can be used with all input drivers. This section only covers configuration details specific to this driver. .PP The driver can auto-detect the mouse type on some platforms. On some platforms this is limited to plug and play serial mice, and on some the auto-detection works for any mouse that the OS's kernel driver supports. On others, it is always necessary to specify the mouse protocol in the config file. The .I README document provided with this driver contains some detailed information about this. .PP The following driver .B Options are supported: .TP 7 .BI "Option \*qProtocol\*q \*q" string \*q Specify the mouse protocol. Valid protocol types include: .PP .RS 12 Auto, Microsoft, MouseSystems, MMSeries, Logitech, MouseMan, MMHitTab, GlidePoint, IntelliMouse, ThinkingMouse, ValuMouseScroll, AceCad, PS/2, ImPS/2, ExplorerPS/2, ThinkingMousePS/2, MouseManPlusPS/2, GlidePointPS/2, NetMousePS/2, NetScrollPS/2, BusMouse, SysMouse, WSMouse, USB, VUID, Xqueue. .RE .PP .RS 7 Not all protocols are supported on all platforms. The "Auto" protocol specifies that protocol auto-detection should be attempted. The default protocol setting is platform-specific. .RE .TP 7 .BI "Option \*qDevice\*q \*q" string \*q Specifies the device through which the mouse can be accessed. A common setting is "/dev/mouse", which is often a symbolic link to the real device. This option is mandatory, and there is no default setting. The driver may however attempt to probe some default devices if this option is missing. Property: "Device Node" (read-only). .TP 7 .BI "Option \*qButtons\*q \*q" integer \*q Specifies the number of mouse buttons. In cases where the number of buttons cannot be auto-detected, the default value is 3. The maximum number is 24. .TP 7 .BI "Option \*qEmulate3Buttons\*q \*q" boolean \*q Enable/disable the emulation of the third (middle) mouse button for mice which only have two physical buttons. The third button is emulated by pressing both buttons simultaneously. Default: on, until a press of a physical button 3 is detected. Property: "Mouse Middle Button Emulation" .TP 7 .BI "Option \*qEmulate3Timeout\*q \*q" integer \*q Sets the timeout (in milliseconds) that the driver waits before deciding if two buttons where pressed "simultaneously" when 3 button emulation is enabled. Default: 50. Property: "Mouse Middle Button Timeout" .TP 7 .BI "Option \*qChordMiddle\*q \*q" boolean \*q Enable/disable handling of mice that send left+right events when the middle button is used. Default: off. .TP 7 .BI "Option \*qEmulateWheel\*q \*q" boolean \*q Enable/disable "wheel" emulation. Wheel emulation means emulating button press/release events when the mouse is moved while a specific real button is pressed. Wheel button events (typically buttons 4 and 5) are usually used for scrolling. Wheel emulation is useful for getting wheel-like behaviour with trackballs. It can also be useful for mice with 4 or more buttons but no wheel. See the description of the .BR EmulateWheelButton , .BR EmulateWheelInertia , .BR XAxisMapping , and .B YAxisMapping options below. Default: off. .TP 7 .BI "Option \*qEmulateWheelButton\*q \*q" integer \*q Specifies which button must be held down to enable wheel emulation mode. While this button is down, X and/or Y pointer movement will generate button press/release events as specified for the .B XAxisMapping and .B YAxisMapping settings. If set to 0, no button is required and any motion of the device is converted into wheel events. Default: 4. .TP 7 .BI "Option \*qEmulateWheelInertia\*q \*q" integer \*q Specifies how far (in pixels) the pointer must move to generate button press/release events in wheel emulation mode. Default: 10. .TP 7 .BI "Option \*qEmulateWheelTimeout\*q \*q" integer \*q Specifies the time in milliseconds the .BR EmulateWheelButton must be pressed before wheel emulation is started. If the .BR EmulateWheelButton is released before this timeout, the original button press/release event is sent. Default: 200. .TP 7 .BI "Option \*qXAxisMapping\*q \*q" "N1 N2" \*q Specifies which buttons are mapped to motion in the X direction in wheel emulation mode. Button number .I N1 is mapped to the negative X axis motion and button number .I N2 is mapped to the positive X axis motion. Default: no mapping. .TP 7 .BI "Option \*qYAxisMapping\*q \*q" "N1 N2" \*q Specifies which buttons are mapped to motion in the Y direction in wheel emulation mode. Button number .I N1 is mapped to the negative Y axis motion and button number .I N2 is mapped to the positive Y axis motion. Default: no mapping. .TP 7 .BI "Option \*qZAxisMapping\*q \*qX\*q" .TP 7 .BI "Option \*qZAxisMapping\*q \*qY\*q" .TP 7 .BI "Option \*qZAxisMapping\*q \*q" "N1 N2" \*q .TP 7 .BI "Option \*qZAxisMapping\*q \*q" "N1 N2 N3 N4" \*q Set the mapping for the Z axis (wheel) motion to buttons or another axis .RB ( X or .BR Y ). Button number .I N1 is mapped to the negative Z axis motion and button number .I N2 is mapped to the positive Z axis motion. For mice with two wheels, four button numbers can be specified, with the negative and positive motion of the second wheel mapped respectively to buttons number .I N3 and .IR N4 . Note that the protocols for mice with one and two wheels can be different and the driver may not be able to autodetect it. Default: "4 5". .TP 7 .BI "Option \*qButtonMapping\*q \*q" "N1 N2 [...]" \*q Specifies how physical mouse buttons are mapped to logical buttons. Physical button 1 is mapped to logical button .IR N1 , physical button 2 to .IR N2 , and so forth. This enables the use of physical buttons that are obscured by .IR ZAxisMapping . Default:\ "1\ 2\ 3\ 8\ 9\ 10\ ...". .TP 7 .BI "Option \*qFlipXY\*q \*q" boolean \*q Enable/disable swapping the X and Y axes. This transformation is applied after the .BR InvX , .B InvY and .BR AngleOffset transformations. Default: off. .TP 7 .BI "Option \*qInvX\*q \*q" boolean \*q Invert the X axis. Default: off. .TP 7 .BI "Option \*qInvY\*q \*q" boolean \*q Invert the Y axis. Default: off. .TP 7 .BI "Option \*qAngleOffset\*q \*q" integer \*q Specify a clockwise angular offset (in degrees) to apply to the pointer motion. This transformation is applied before the .BR FlipXY , .B InvX and .B InvY transformations. Default: 0. .TP 7 .BI "Option \*qSampleRate\*q \*q" integer \*q Sets the number of motion/button events the mouse sends per second. Setting this is only supported for some mice, including some Logitech mice and some PS/2 mice on some platforms. Default: whatever the mouse is already set to. .TP 7 .BI "Option \*qResolution\*q \*q" integer \*q Sets the resolution of the device in counts per inch. Setting this is only supported for some mice, including some PS/2 mice on some platforms. Default: whatever the mouse is already set to. .TP 7 .BI "Option \*qSensitivity\*q \*q" float \*q Mouse movements are multiplied by this float before being processed. Use this mechanism to slow down high resolution mice. Because values bigger than 1.0 will result in not all pixels on the screen being accessible, you should better use mouse acceleration (see .BR "man xset" ) for speeding up low resolution mice. Default: 1.0 .TP 7 .BI "Option \*qDragLockButtons\*q \*q" "L1 B2 L3 B4" \*q Sets \*qdrag lock buttons\*q that simulate holding a button down, so that low dexterity people do not have to hold a button down at the same time they move a mouse cursor. Button numbers occur in pairs, with the lock button number occurring first, followed by the button number that is the target of the lock button. .TP 7 .BI "Option \*qDragLockButtons\*q \*q" "M1" \*q Sets a \*qmaster drag lock button\*q that acts as a \*qMeta Key\*q indicating that the next button pressed is to be \*qdrag locked\*q. .TP 7 .BI "Option \*qClearDTR\*q \*q" boolean \*q Enable/disable clearing the DTR line on the serial port used by the mouse. Some dual-protocol mice require the DTR line to be cleared to operate in the non-default protocol. This option is for serial mice only and is handled by the X server. Default: off. .TP 7 .BI "Option \*qClearRTS\*q \*q" boolean \*q Enable/disable clearing the RTS line on the serial port used by the mouse. Some dual-protocol mice require the RTS line to be cleared to operate in the non-default protocol. This option is for serial mice only and is handled by the X server. Default: off. .TP 7 .BI "Option \*qBaudRate\*q \*q" integer \*q Set the baud rate to use for communicating with a serial mouse. This option should rarely be required because the default is correct for almost all situations. Valid values include: 300, 1200, 2400, 4800, 9600, 19200. Default: 1200. .PP There are some other options that may be used to control various parameters for serial port communication, but they are not documented here because the driver sets them correctly for each mouse protocol type. .SH "SEE ALSO" __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__), README.mouse. hal(__miscmansuffix__), hald(__adminmansuffix__), fdi(__filemansuffix__). xf86-input-mouse-1.9.0/man/Makefile.am0000664003204500007640000000266411461151107014343 00000000000000# # Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. # # 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 # the rights to use, copy, modify, merge, publish, distribute, sublicense, # 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 NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS 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. # drivermandir = $(DRIVER_MAN_DIR) driverman_PRE = mousedrv.man driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) EXTRA_DIST = mousedrv.man CLEANFILES = $(driverman_DATA) SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ xf86-input-mouse-1.9.0/ChangeLog0000664003204500007640000023355712124442510013313 00000000000000commit 35cae8f4352002c8dce85dbc86cebb50e915a478 Author: Peter Hutterer Date: Wed Mar 27 10:59:05 2013 +1000 mouse 1.9.0 Signed-off-by: Peter Hutterer commit 585f4030d77accf2a4ba115729ca08da82217863 Author: Colin Walters Date: Wed Jan 4 17:37:06 2012 -0500 autogen.sh: Implement GNOME Build API http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson commit 8e74b1db7b32a2a2bb668a8edc6757cc5b77157a Author: Adam Jackson Date: Wed Jan 16 13:11:11 2013 -0500 configure: Drop AM_MAINTAINER_MODE Signed-off-by: Adam Jackson commit 3b199a175da8485c216ccccb68df4cf539899619 Author: Peter Hutterer Date: Wed Aug 15 14:38:28 2012 +1000 Use signal-safe logging if available Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit cb1f60930bdc8121e5d7b9210f9491d1116d6aef Author: Peter Hutterer Date: Wed Aug 15 14:43:14 2012 +1000 Fix compilation error with EXTMOUSEDEBUG on pInfo->atom was removed in xorg-server-1.9.0-26-g9802cca Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 29dbd85c4617a062d2003e0673806b92f8397492 Author: Peter Hutterer Date: Tue Jul 31 09:39:38 2012 +1000 xf86-input-mouse 1.8.1 Signed-off-by: Peter Hutterer commit 5a5f41659d4e43330407fa8895710c865d2b5328 Author: Alan Coopersmith Date: Mon Jul 30 15:56:18 2012 -0700 Fix compiler warning in sun_mouse.c (Solaris-only) sun_mouse.c: In function 'vuidRemoveMouse': sun_mouse.c:150:42: warning: declaration of 'time' shadows a global declaration Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5748979008acafd1a8b28f47e292ed6a9706474c Author: Peter Hutterer Date: Tue Jul 31 08:28:27 2012 +1000 Rename xf86-mouse.pc to xorg-mouse.pc Other input drivers already shipping pkgconfig files use this naming scheme and since the 1.8 release didn't install the file anyway, renaming is still acceptable at this point. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit a5630a5668793e3bdc6190b5e2ee22d7c28dda0c Author: Peter Hutterer Date: Mon Jul 30 09:06:49 2012 +1000 Install xf86-mouse.pc file Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Alan Coopersmith commit 7c1e63ef00777553cca66781b8db0272bd405db0 Author: Peter Hutterer Date: Mon Jul 30 15:53:22 2012 +1000 Fix compiler warnings pnp.c: In function 'probePs2ProtocolPnP': pnp.c:711:31: warning: declaration of 'seq' shadows a previous local [-Wshadow] pnp.c:705:23: warning: shadowed declaration is here [-Wshadow] mouse.c: In function 'MouseCommonOptions': mouse.c:330:13: warning: declaration of 'i' shadows a previous local [-Wshadow] mouse.c:279:9: warning: shadowed declaration is here [-Wshadow] mouse.c: In function 'autoProbeMouse': mouse.c:3602:29: warning: declaration of 'proto' shadows a global declaration [-Wshadow] mouse.c:2482:22: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit 3c0c022672324286b0e936977ca267c6b04dc0f2 Author: Alan Coopersmith Date: Thu Jul 26 23:10:47 2012 -0700 xf86-input-mouse 1.8.0 Signed-off-by: Alan Coopersmith commit 66792aff9562a3cd69576739e4dae116edb31efd Author: Alan Coopersmith Date: Wed Jul 25 22:12:02 2012 -0700 Fix vuidMouseAdjustFrame to build with Xorg 1.13 ABI Signed-off-by: Alan Coopersmith commit a2494e6fe3168b03f2ebc7d584db0256657c891f Author: Alan Coopersmith Date: Mon Jul 23 22:11:57 2012 -0700 Raise bar for xorg-server to 1.7 for XINPUT ABI 7 Not all of the button label settings were wrapped in ABI #ifdefs, so just drop all #ifdefs for GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 7 Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Sequoia commit 88e90dde7a5ffff67da9e091e59c09f2a0828582 Author: Alan Coopersmith Date: Mon Apr 30 20:36:40 2012 -0700 Expand tabs to spaces Existing code had a mix of places tab & space characters were used. Make them all spaces for consistency, since that's the new style chosen for xorg-server. "git diff -w" shows no changes - this is pure whitespace adjustment. Signed-off-by: Alan Coopersmith commit 580e739de0b15df9b7982213d2e2d9b84413b157 Author: Alan Coopersmith Date: Mon Apr 30 20:33:27 2012 -0700 Strip trailing whitespace cleanup done via: perl -p -i -e 's/[\t ]*$//' "git diff -w" shows no changes - this is pure whitespace adjustment. Signed-off-by: Alan Coopersmith commit 1816cd91981c0f9673cf56dc4f5b0021e9cbbc65 Author: Alan Coopersmith Date: Fri Apr 27 17:36:01 2012 -0700 Add settable properties for middle mouse button emulation Based on evdev's similar properties, including using the name "middle" button, to avoid confusion with evdev's 3rd button emulation for emulating the right button on a single button mouse. Allows manual enable & disable at runtime. Exports new xf86-mouse.pc & xf86-mouse-properties.h for property name definitions. Signed-off-by: Alan Coopersmith Reviewed-by: Alexandr Shadchin Reviewed-by: Peter Hutterer commit 84090b15ea6346d0764a0e0be3f0bd65a7e0fe7c Author: Alan Coopersmith Date: Fri Apr 27 15:57:28 2012 -0700 Set button & axis labels Signed-off-by: Alan Coopersmith Reviewed-by: Alexandr Shadchin Reviewed-by: Peter Hutterer commit 4b6738c8409fe73596863b37a8fcad8ae352d121 Author: Alan Coopersmith Date: Fri Apr 27 15:44:00 2012 -0700 Set XI_PROP_DEVICE_NODE property to string from "Device" option Signed-off-by: Alan Coopersmith Reviewed-by: Alexandr Shadchin Reviewed-by: Peter Hutterer commit 5583a77bbadd2e89cbc69a66f27deee1a5da982c Author: Alan Coopersmith Date: Fri Apr 27 14:31:20 2012 -0700 sun_mouse.c: Remove redundant option checks Previously they checked pInfo->options, then fell back to pInfo->conf_idev->commonOptions - but then 7bf22a368c752fe76dc replaced the latter with the former, resulting in some redunancy. Signed-off-by: Alan Coopersmith Reviewed-by: Alexandr Shadchin Reviewed-by: Peter Hutterer commit 80d724d13a8de585722967f7d18a65b4b555badd Author: Alan Coopersmith Date: Thu Mar 15 23:34:21 2012 -0700 xf86-input-mouse 1.7.2 Signed-off-by: Alan Coopersmith commit 68a1e2f74dd58c913e5d1f8d6138cd8ce73232a4 Author: Alan Coopersmith Date: Thu Dec 22 20:55:45 2011 -0800 sun_mouse.c: remove unused variables Signed-off-by: Alan Coopersmith commit a5126694b29bdf9c852254b53174fcf37537b121 Author: Alan Coopersmith Date: Thu Dec 22 20:54:14 2011 -0800 Mark symtab_t.name in pnp.c as const to fix gcc -Wwrite-strings warnings Signed-off-by: Alan Coopersmith commit 8bc8502c698115c3f4885ba42e60ede0e681caaa Author: Alan Coopersmith Date: Wed Nov 30 19:29:01 2011 -0800 Avoid NULL pointer dereference in autoProbeMouse if proto == PROT_UNSUP Error: Null pointer dereference (CWE 476) Read from null pointer 'GetProtocol(proto)' at line 3477 of src/mouse.c in function 'autoProbeMouse'. Function 'GetProtocol' may return constant 'NULL' at line 736, called at line 3477. Null pointer introduced at line 736 in function 'GetProtocol'. We already handle one of the two cases that make GetProtocol return NULL, proto == PROTO_UNKNOWN, but not PROT_UNSUP. [ This bug was found by the Parfait 0.4.2 bug checking tool. For more information see http://labs.oracle.com/projects/parfait/ ] Signed-off-by: Alan Coopersmith Reviewed-by: Alexandr Shadchin commit b65651974ee5620086b484086ea12d78c92fa369 Author: Alexandr Shadchin Date: Fri Aug 19 21:07:13 2011 +0600 Fix wrong read Protocol and Device from xorg.conf Add call xf86CollectInputOptions() before using pInfo->options. The bug is seeing by ABI < 12. Signed-off-by: Alexandr Shadchin Reviewed-by: Matthieu Herrb Signed-off-by: Peter Hutterer commit 7bb5cbecbcc24f20467546f957fb95c9190514c0 Author: Alan Coopersmith Date: Mon Jul 25 21:11:50 2011 -0700 sun_mouse.c: Ensure vuidMouse setup routines are called for protocol "Auto" Fixes regression caused by commit b12fa0d5ab23 in which devices with protocol "Auto" (generally just PS/2 devices on Solaris, since HAL sets protocol "VUID" for USB devices already) weren't going through vuidMousePreInit and setting up the device_control & read_input pointers to the routines which know how to decode VUID packets. Adds a check to vuidPreInit to ensure we don't leak memory if called twice for the same device, just in case I missed a code path, or a new one appears in the future. Fixes Solaris bug 7070321: Mouse protocol "Auto" does not work in build 170 Signed-off-by: Alan Coopersmith Acked-by: Peter Hutterer commit 94fb2250b12fbaf840352b83dd9f832319c92b0f Author: Alan Coopersmith Date: Mon Jul 25 20:40:03 2011 -0700 No need to merge NULL options list with existing options Appending NULL to an existing options list simply walks the entire existing list before returning it unchanged, so if we aren't creating a new list to merge, don't bother merging it either. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 93ebeecdda61cc7121b5c095ed5db07ad0ca0f88 Author: Terry Lambert Date: Fri Jul 15 17:23:23 2011 -0700 xf86-input-mouse: Return proper default for unknown values in pInfo->device_control. Signed-off-by: Terry Lambert Reviewed-by: Stephane Marchesin Signed-off-by: Peter Hutterer commit 9f969bd4d1995aa802bef1cfe93afedc412bbd8a Author: Alan Coopersmith Date: Tue Jul 5 09:09:26 2011 -0700 xf86-input-mouse 1.7.1 Signed-off-by: Alan Coopersmith commit b12fa0d5ab23237bc2ac02143739ef6861e55146 Author: Alan Coopersmith Date: Fri Jun 24 22:52:59 2011 -0700 Fix Solaris issues with new ABI12 init process. Based on BSD changes in commit a22879c6779283684fe4a61543fc95179b4f5d0b by Alexandr Shadchin Fix segfaults when mouse device fails to open. Signed-off-by: Alan Coopersmith Signed-off-by: Peter Hutterer commit 1780667854d73bbd0e0596271b09f93321cd0b1d Author: Samuel Thibault Date: Wed Mar 30 02:26:25 2011 +0200 Fix Hurd mouse driver with XInput ABI before 12 Commit 7bf22a36 (Use pInfo->options instead of conf-idev.) updated the xf86CollectInputOptions call into keeping previous options (for ABI before 12). The hurd mouse driver also needs to be updated. commit d6e9623875de5714e85f7da5782ea665116f86dc Author: Samuel Thibault Date: Wed Mar 30 01:00:47 2011 +0200 Fix OSMouse OS-defined protocol support Fix regression introduced by 0a088df6: in the case of an OS-specific protocol, the protocol is PROT_UNKNOWN, but should not be rejected: the core mouse drive just needs to let the OS driver handle it. Signed-off-by: Samuel Thibault commit a07c353f01f99ef3e62f84a32e91d539a4e4863a Author: Peter Hutterer Date: Thu Mar 10 08:32:23 2011 +1000 mouse 1.7.0 Signed-off-by: Peter Hutterer commit a22879c6779283684fe4a61543fc95179b4f5d0b Author: Alexandr Shadchin Date: Wed Mar 9 20:09:59 2011 +0500 Fix BSD issues with new ABI12 init process. From Bug 34794: "Until xf86-input-mouse-1.6.0, the MousePreInit() function exited if an os specific PreInit function existed. It let the os-specific function finish all initialisations that remained to be done after osInfo->PreInit() was called. The code in master now continues, and does things that the bsdMousePreInit() function in bsd_mouse.c doesn't expect." Fix up wsconsPreInit to deal with the new init process. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=34794 Signed-off-by: Alexandr Shadchin Reviewed-by: Matthieu Herrb Signed-off-by: Peter Hutterer commit 2e507df6704ebd2cab6ada450ed40d89a2d3ca19 Author: Peter Hutterer Date: Mon Feb 21 10:06:54 2011 +1000 mouse 1.6.99.901 Signed-off-by: Peter Hutterer commit 70f1d8579ef86dd428eabcb3752b5d1bce47b8f7 Author: Peter Hutterer Date: Mon Feb 21 09:40:13 2011 +1000 man: ClearDTR and ClearRTS are handled by the X server. If it breaks, we know who to blame (or file a bug against). Signed-off-by: Peter Hutterer Reviewed-by: Cyril Brulebois commit 194c5913e92c84d1a30447d43b5beee77a98b7ba Author: Peter Hutterer Date: Mon Feb 21 09:33:37 2011 +1000 man: protocol option isn't mandatory, it's platform-specific. Signed-off-by: Peter Hutterer Reviewed-by: Cyril Brulebois commit f70a9817a2eb845eb9718c0ed6540de1ffe7e531 Author: Peter Hutterer Date: Mon Feb 21 09:30:36 2011 +1000 man: fix typo "Auto platform" → "Auto protocol" Signed-off-by: Peter Hutterer Reviewed-by: Cyril Brulebois commit a45b5d0eaf871c139b057f757869a20fd617d529 Author: Peter Hutterer Date: Mon Feb 21 09:29:59 2011 +1000 man: README.mouse is just README Signed-off-by: Peter Hutterer Reviewed-by: Cyril Brulebois commit 9140e2640319833658a2be5ab2f8349a79ff20aa Author: Peter Hutterer Date: Mon Feb 21 09:28:26 2011 +1000 man: add mention of xorg.conf.d snippet Signed-off-by: Peter Hutterer Reviewed-by: Cyril Brulebois commit af784aad332d67bb746597d5de032ca320928d51 Author: Peter Hutterer Date: Mon Feb 21 09:24:38 2011 +1000 man: remove mention of core pointer. This doesn't apply to X servers 1.7 and later. Signed-off-by: Peter Hutterer Reviewed-by: Cyril Brulebois commit 6b5a82e4e85ab12df23ecf30f2b07eb4c5763e93 Author: Alan Coopersmith Date: Mon Nov 29 22:25:52 2010 -0800 Add ABI checks around XI86_CONFIGURED uses in OS-specific PreInits Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 73bb42e10033cfeb41ba540ea0303b882ff7e61e Author: Peter Hutterer Date: Thu Nov 25 11:35:29 2010 +1000 Bump to 1.6.99 Signed-off-by: Peter Hutterer commit 0a088df6b2f5cac05a00c4f461274b83feb1a9a8 Author: Peter Hutterer Date: Mon Oct 25 14:34:28 2010 +1000 Adjust to new Input ABI 12. New PreInit prototype and a couple of other minor changes. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit fedd52ba781da1960ada0a96b85293afe2509a4a Author: Peter Hutterer Date: Mon Oct 25 11:16:22 2010 +1000 ABI 12 requires per-valuator modes. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 7bf22a368c752fe76dc60c3ea0f70ec1a46d653e Author: Peter Hutterer Date: Mon Oct 25 14:36:59 2010 +1000 Use pInfo->options instead of conf-idev. Because it doesn't really matter anyway, I think. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit f3f405db5603ecca5bc14dba23628ea56a0f5202 Author: Peter Hutterer Date: Mon Oct 25 16:08:49 2010 +1000 Remove write-only field mouseFlags. The flags were used to store ClearDTS and ClearRTR, but those options only resulted in log messages. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit 23308a251e16c4a6ab3c89c0505b0d8900c9cdff Author: Peter Hutterer Date: Mon Oct 25 13:51:59 2010 +1000 Rename xf86OSMouseInit to OSMouseInit. This isn't a DDX function anymore. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit 9263c949df6cbbb8e42ec4f0d6337206f684d0f5 Author: Peter Hutterer Date: Mon Oct 25 13:49:23 2010 +1000 Remove random History comment. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit ecc3d28fa488f186896d714b8872b8875f8eccfd Author: Peter Hutterer Date: Mon Oct 25 13:46:13 2010 +1000 Rename xf86OSmouse.h to mouse.h The driver-internal mouse.h header was only an include command for xf86OSmouse.h anyway. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit a92175888885ac77c87d52309cba87f1e9c96e73 Author: Peter Hutterer Date: Mon Oct 25 13:43:47 2010 +1000 Remove a bunch of unused fields from the MouseRec. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit a48e8ce9434837d649eb88058aa9406f1bf9dce9 Author: Peter Hutterer Date: Mon Oct 25 13:41:26 2010 +1000 Move a statement down to have all allocations close together. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit f3ac92a41b9e85a0cfba011812b637b1f3ae2529 Author: Peter Hutterer Date: Mon Oct 25 13:35:55 2010 +1000 Remove convoluted do { } while loop. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit fac47e7df6f719b1fce5341b343cabcbe150b52f Author: Peter Hutterer Date: Mon Oct 25 13:34:21 2010 +1000 Move protocol ID detection into a separate function. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit 859b8f2c4d964cd9b40dcbc64bd28fc98e129387 Author: Peter Hutterer Date: Mon Oct 25 12:17:19 2010 +1000 Use single exit path for PreInit. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit 11f94120035d1c4e2d1d299d9fa19f79ca3ed75e Author: Peter Hutterer Date: Mon Oct 25 12:13:00 2010 +1000 De-duplicate Option "Device" handling. Move the warning messages and the OS-specific autoprobing calls into a new function. This will change the order log messages appear in but functional changes should be identical. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit 0b1920abf72664765f7dab4a487839a3d29267a1 Author: Peter Hutterer Date: Mon Oct 25 11:59:17 2010 +1000 Remove unused branch from if 1 condition. This has been in since 2003 or earlier, let's pretend it works. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit 008906b855f05be4d1942d2a3e1afcb8a7ee4b14 Author: Peter Hutterer Date: Mon Oct 25 11:56:36 2010 +1000 Remove a bunch of unnecessary log prints. xf86SetFooOption will print to the log anyway, no need to print twice. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit 9d6723303216e7b6de583716768d0dc972f03d03 Author: Peter Hutterer Date: Mon Oct 25 11:53:21 2010 +1000 Remove if 0'd out model. If 0 since at least 2003 is enough to pretend we don't need this block. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit 6f227252af6458fbf6cbeee43e3f739fd2f03c67 Author: Peter Hutterer Date: Mon Oct 25 15:38:57 2010 +1000 Remove includes for protocol headers. The driver shouldn't need those. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit 3b39dd7ca3a4055e63a8ca55b614912fe47215a6 Author: Peter Hutterer Date: Mon Oct 25 11:49:51 2010 +1000 Remove unused define NEED_X86_TYPES. Not needed for 1.6 and later. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit ef4fad4d823d46be4538daeca0ee3e014efc73c2 Author: Peter Hutterer Date: Mon Oct 25 11:39:42 2010 +1000 Assume ABI_XINPUT_VERSION 4 or higher. We require server 1.6 in configure.ac to build, so let's assume that's the minimal ABI version we support. Purge the rest. Signed-off-by: Peter Hutterer Acked-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit f7b426ef2a6bc181ec700f74b59b39c2e695bf6b Author: Peter Hutterer Date: Mon Oct 25 11:34:41 2010 +1000 Remove refcnt field from InputDriverRec. Wasn't used in the server and is now removed. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit b5fc405451d8fa01b9e5fb6f2da74a6e03d50174 Author: Peter Hutterer Date: Mon Oct 25 11:31:23 2010 +1000 Don't try to call conversion_proc anymore. This hasn't been called since at least server 1.5 or so (ABI 2), possibly longer. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit bb2d63df99457de1e5c06be501a03b5629fc52c8 Author: Peter Hutterer Date: Mon Oct 25 11:10:25 2010 +1000 Replace LocalDevicePtr with InputInfoPtr. No functional changes. The typedef has been removed from the server but was an alias for InputInfoPtr since the dawn of, well, at least git. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit b5f4fc652cf5999045ff9006a55cf75edaba65c0 Author: Peter Hutterer Date: Mon Oct 25 10:57:58 2010 +1000 XI86_POINTER_CAPABLE is gone from the server. And was a write-only flag before that anyway, no ifdef needed. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit 4eefb5bfa837aae2201769360745edcaad4ea8d8 Author: Peter Hutterer Date: Mon Oct 25 10:54:41 2010 +1000 Remove out-of-date comment. /* * XXX This should be done by a function in the core server since the * MouseDevRec is defined in the os-support layer. */ no, it shouldn't and it isn't, in exactly that order. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit fdd5d5c77d05c7f085e6f62c66b31b66087d195d Author: Peter Hutterer Date: Mon Oct 25 10:46:35 2010 +1000 Remove unused declaration of MouseUnInit. To not have an UnInit function one needs to explicitly not define an UnInit function that is then not used, so that definitely no UnInit is performed with the function that is not defined. Philosophically speaking, this may be true. Meanwhile, over here in reality, well... meh. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit abc107eeb8847b9bf2f303abefde5adaab9331bf Author: Peter Hutterer Date: Mon Oct 25 10:45:27 2010 +1000 Replace libc wrappers to xcalloc and friends with libc calls. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit 782052d087fd59d673de6c45784c316c055a592d Merge: 4f1a5cc 6d6c247 Author: Samuel Thibault Date: Wed Sep 29 23:42:43 2010 +0200 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-input-mouse commit 6d6c24768b2b347436a6d35c4aaa129227c7392e Author: Alan Coopersmith Date: Wed Sep 8 23:11:19 2010 -0700 xf86-input-mouse 1.6.0 Signed-off-by: Alan Coopersmith commit 4719334800b7eb88479acdcbbc176019ba9c5bd2 Author: Alan Coopersmith Date: Wed Sep 8 22:58:30 2010 -0700 Bring README a little closer to the current state of reality Signed-off-by: Alan Coopersmith commit 4f1a5cc98c8452362ecb81843cd0a32c9a45ce4e Author: Samuel Thibault Date: Sun Sep 5 21:21:58 2010 +0200 Fix build warning Add extra parentheses to avoid ambiguity. Signed-off-by: Samuel Thibault commit 35f277a718f2da6a09080af020aaf29ef96fe807 Author: Samuel Thibault Date: Sun Sep 5 21:20:33 2010 +0200 Fix mouse data buffering Check remaining buffer size *before* reading a character from the device. Also keep extra characters in the static buffer until next invocation. Signed-off-by: Samuel Thibault commit cb11e9ca60e8ca2590c77f844bfd19e5278f518f Author: Alan Coopersmith Date: Wed Aug 11 21:30:40 2010 -0700 MouseCtrl doesn't need to save values we never use Makes it into a no-op, like evdev's PtrCtrl function, now that mouse acceleration is completely handled in dix. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Patrick E. Kane Reviewed-by: Simon Thum commit 374725ef73ca929f8a951061528d11ee796cb069 Author: Alan Coopersmith Date: Wed Aug 11 20:21:33 2010 -0700 Sun's copyrights belong to Oracle now Signed-off-by: Alan Coopersmith commit 5b208a2b8d1032489a02c465830150422d1123cc Author: Henry Zhao Date: Wed Aug 11 20:16:44 2010 -0700 Check for NULL currentMode in vuidMouseSendScreenSize() Fixes Sun bug 6920647: Core dump in resume when monitor changed in suspend http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6920647 Signed-off-by: Alan Coopersmith commit b9d6d0309abdec7b384cb1f0958b9bcd60364e60 Author: Samuel Thibault Date: Wed Jul 28 21:23:25 2010 +0200 Do not return the address of a local buffer Make the const buffer returned by FindDevice a static const buffer, to avoid letting be on the stack. Signed-off-by: Samuel Thibault commit 75300d6ae5a5b2324224423c9f976cba50e47547 Author: Patrick E. Kane Date: Fri Jul 16 11:13:20 2010 -0500 xf86-input-mouse: Update sun_mouse devPrivates code #29049 Update the sun_mouse devPrivates code to conform to the new API (introducted by commit faeebead7bfcc78535757ca7acc1faf7554c03b7) that requires the PrivateKey to be registered. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=29049 Signed-off-by: Patrick E. Kane Reviewed-by: Jamey Sharp Signed-off-by: Jamey Sharp commit 112caa1724e139caeb91c792c394b21d1391b370 Author: Fernando Carrijo Date: Thu Jul 1 07:13:05 2010 -0300 Purge macro NEED_EVENTS Signed-off-by: Fernando Carrijo Acked-by: Tiago Vignatti Reviewed-by: Alan Coopersmith commit b714882b0245a2d6078d8778156e88813761f2c4 Author: Gaetan Nadon Date: Thu May 27 18:57:33 2010 -0400 config: use AC_PROG_INSTALL now supplied by XORG_DEFAULT_OPTIONS The existing statement can now be removed from the configuration file. Signed-off-by: Gaetan Nadon commit 1188152feee345b7a0f39513cd9d7b8bab938338 Author: Gaetan Nadon Date: Thu May 27 09:32:59 2010 -0400 config: upgrade to util-macros 1.8 for additional man page support Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS The value of MAN_SUBST is the same for all X.Org packages. Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS The existing statement can now be removed from the configuration file. Signed-off-by: Gaetan Nadon commit ad78ef7a9488f7235032e106839224fc43f20e5f Author: Gaetan Nadon Date: Thu May 13 16:09:03 2010 -0400 config: let AC_PROG_SED find the best value for $SED Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit 9a9344e66d2e03ee44bf6fe6a1c1d97082a74c20 Author: Gaetan Nadon Date: Thu May 13 15:59:24 2010 -0400 README: keep the text version of README, discard the sgml version The linuxdoc doc tool is deprecated. README files are exclusively text files. The file had not been updated for 5 years. Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit 9711c050e6d2a7c7c89ddc26775d819b5bc41ad3 Author: Gaetan Nadon Date: Thu May 13 14:29:32 2010 -0400 config: fix warnings, m4 quoting and layout Fix some m4 quoting Fix some autoconf warnings Regroup statements per section Add comments Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit 86ddfe77024dbd94e99695a23ba77c2100b7e3e8 Author: Gaetan Nadon Date: Thu May 13 14:08:04 2010 -0400 config: Upgrade X.Org macros to 1.4 for INSTALL file copying Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit 349db3f68d7f727b965132ade5bcefd5da6ad399 Author: Gaetan Nadon Date: Thu May 13 14:01:28 2010 -0400 config: remove AC_PROG_CC as it overrides AC_PROG_C_C99 XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls AC_PROG_C_C99. This sets gcc with -std=gnu99. If AC_PROG_CC macro is called afterwards, it resets CC to gcc. Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit 59ace3b6fd3c1901e8025f4785c31d514aac3b3f Author: Gaetan Nadon Date: Thu May 13 14:00:41 2010 -0400 config: remove unrequired AC_HEADER_STDC Autoconf says: "This macro is obsolescent, as current systems have conforming header files. New programs need not use this macro". Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit 540f1d8826aeee17235bd29c42144fe52213130c Author: Gaetan Nadon Date: Thu May 13 14:00:06 2010 -0400 config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS Regroup AC statements at the top. Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit 27d00be1f8ae04be0bcb73d2744731ded527e8e5 Author: Gaetan Nadon Date: Thu May 13 13:58:03 2010 -0400 config: update AC_PREREQ statement to 2.60 Unrelated to the previous patches, the new value simply reflects the reality that the minimum level for autoconf to configure all x.org modules is 2.60 dated June 2006. ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit f76449cbe38d9f2e925d0af0cd0b1050168d86d1 Author: Gaetan Nadon Date: Thu May 13 13:28:37 2010 -0400 config: optional extension check for inputproto not required The check should be in PKG_CHECK_MODULES permanently. The XORG_DRIVER_CHECK_EXT will add inputproto to PKG_CHECK_MODULES only if the extension is available. By definition, this extension is an integral part of the server and is always present. The server always sets XINPUT macro to 1. The conditional code was removed Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit a4dfc92927c8e26aca58da11bae1e516238fd60a Author: Gaetan Nadon Date: Thu May 13 13:27:02 2010 -0400 config: remove extension check for unused RANDR extension The randr protocol is not used, no randr*.h are included. Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit ecc0b614aa3077e4d73f1b1a567486f5540f3eb5 Author: Gaetan Nadon Date: Thu May 13 13:12:34 2010 -0400 config: remove AH_TOP autoheader statement The generated config.h does not need to include xorg-server.h for the content it provides. Add #include in .[hc] files as needed. Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit 4ef973d4c740a0b92e6b0d1afae1d6fca0386bd8 Author: Gaetan Nadon Date: Thu May 13 13:08:00 2010 -0400 Remove unused SCO driver files The SCO driver has never been enabled since its original commit Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit 0071e2eb6bd3c31be108b7cdbc415498c83ed1c6 Author: Gaetan Nadon Date: Wed Apr 28 18:18:14 2010 -0400 README: update text content from sgml content Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit 4fc24a0093d453944dc8d46aebe27b1671d45c77 Author: Gaetan Nadon Date: Tue Apr 27 13:50:20 2010 -0400 README: fix linuxdoc content defs.ent are located under X11 directory ident tag is not a Linuxdoc tag replace docbook email tag with linuxdoc email tag replace with which preserves tabs Reviewed-by: Rémi Cardona Signed-off-by: Gaetan Nadon commit 3ee9b720856efa240b70d38172706485f6420289 Author: Márton Németh Date: Tue Apr 13 00:35:57 2010 -0700 Bug 10866 - serial Genius NetScroll+ autodetection https://bugs.freedesktop.org/show_bug.cgi?id=10866 Signed-off-by: Alan Coopersmith commit c74d482378a85eef26dd85fc191f602e0f7c667f Author: Alan Coopersmith Date: Wed Jan 20 17:47:20 2010 -0800 Solaris: Handle ENODEV & other errors from VUID protocol mice Adapted code from keyboard fix for ENODEV to do the same thing for the mouse Use normal read() calls for reading from the mouse so we can get the ENODEV errors, instead of going through the Xisb*() wrappers, which are needed for reading directly from serial ports (which this code never does since it's only used with VUID mouse event streams from the kernel). Fixes http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6844148 Signed-off-by: Alan Coopersmith commit a2d158c290a831dffef3613ddb736c04377c51e7 Author: Gaetan Nadon Date: Tue Mar 9 13:12:10 2010 -0500 config: remove unused -I$(top_srcdir)/src directive There are no sibling directories that need access to /src headers Signed-off-by: Gaetan Nadon commit c9ebc0c532bf72e459ec93f6ff4198dfd7e32252 Author: Alan Coopersmith Date: Fri Jan 15 14:48:49 2010 -0800 Update Sun license notices to current X.Org standard form Signed-off-by: Alan Coopersmith commit 36cb94a9af364c18ccae774d79a8c1f937cb786f Author: Gaetan Nadon Date: Tue Dec 15 22:01:02 2009 -0500 configure.ac: remove unused sdkdir=$(pkg-config...) statement The sdkdir variable isn't use, so remove the statement. Acked-by: Dan Nicholson Signed-off-by: Gaetan Nadon commit 327ede732bd05185a459c195dbc9ceee250b3b71 Author: Alan Coopersmith Date: Wed Dec 16 18:17:26 2009 -0800 Silence sed substitutions in make output Signed-off-by: Alan Coopersmith commit c6ff6c3bba57a5134b050bead65dd6a1ff2f42aa Author: Peter Hutterer Date: Thu Dec 3 11:27:30 2009 +1000 Plug minor memory leak. This change splits the DEVICE_CLOSE behaviour from the DEVICE_OFF behaviour. This doesn't change functionality as the server guarantees DEVICE_OFF to be called first and DEVICE_CLOSE thus becomes a noop anyway. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 6ac394cafc959980893553955e98827c7cb45119 Author: Gaetan Nadon Date: Mon Nov 23 09:25:05 2009 -0500 Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES Now that the INSTALL file is generated. Allows running make maintainer-clean. commit 9705701af25089ba8896d706f13403416f632cb4 Author: Gaetan Nadon Date: Wed Oct 28 14:41:41 2009 -0400 INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 Automake 'foreign' option is specified in configure.ac. Remove from Makefile.am commit a80227b40dd710e13fb497f2f01a51afb0e5337c Author: Gaetan Nadon Date: Wed Oct 28 14:09:09 2009 -0400 INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 Add missing INSTALL file. Use standard GNU file on building tarball README may have been updated Remove AUTHORS file as it is empty and no content available yet. Remove NEWS file as it is empty and no content available yet. commit ad49b908b8b6aa7643325e8be75e0b0e5c7e764d Author: Gaetan Nadon Date: Mon Oct 26 12:54:20 2009 -0400 Several driver modules do not have a ChangeLog target in Makefile.am #23814 The git generated ChangeLog replaces the hand written one. Update configure.ac to xorg-macros level 1.3. Use XORG_DEFAULT_OPTIONS which replaces four XORG_* macros Update Makefile.am to add ChangeLog target if missing Remove ChangeLog from EXTRA_DIST or *CLEAN variables This is a pre-req for the INSTALL_CMD commit 034f5430549b0c713b0be302e067e4f1fd02c6fb Author: Gaetan Nadon Date: Thu Oct 22 12:34:16 2009 -0400 .gitignore: use common defaults with custom section # 24239 Using common defaults will reduce errors and maintenance. Only the very small or inexistent custom section need periodic maintenance when the structure of the component changes. Do not edit defaults. commit 2b6dc8ccfe85356d309e3191cf5b942c6d4e0cd5 Author: Peter Hutterer Date: Tue Oct 6 12:09:46 2009 +1000 mouse 1.5.0 Signed-off-by: Peter Hutterer commit 6bae95035db026b7f3189a21942ce7953a6e3437 Author: Peter Hutterer Date: Tue Oct 6 12:07:45 2009 +1000 Require macros 1.3 for XORG_DEFAULT_OPTIONS Signed-off-by: Peter Hutterer commit 622cf1834725c3348cfdc41c12e39b327011c836 Author: Alan Coopersmith Date: Sat Sep 12 20:18:06 2009 -0700 Fix crashes due to MouseBlockHandler/MouseWakeupHandler with invalid devices Don't install the handlers if devices failed to open/initalize. Remove the handlers when disabling Emulate3Soft mode, since otherwise they'll be left around when device is closed & device structs are freed. Signed-off-by: Alan Coopersmith commit bc7933171e08215ba28bc06c80ee1bc1febc0522 Author: Peter Hutterer Date: Wed Sep 9 11:48:58 2009 +1000 mouse 1.4.99.1 Signed-off-by: Peter Hutterer commit 04a29c8c8ebc6fbc6f5b67026b659a2ffdd6540b Author: Gaetan Nadon Date: Mon Sep 7 11:12:13 2009 -0400 xf86-input-mouse: Remove unused .cvsignore file #23776 Signed-off-by: Peter Hutterer commit fa997144458527856b71fa162a105a46af8e688a Author: Donald Kayser Date: Thu Sep 3 09:22:30 2009 +1000 signed/unsigned fixes for delta x,y movement Changed the cast of (char) to (signed char) while computing delta x and delta y mouse movements. The C standard does not define compiler behavior, and currently with PPC builds, the (char) cast is unsigned. To guarantee that the compiler will generate signed values, the cast has been changed Signed-off-by: Donald Kayser Signed-off-by: Peter Hutterer commit f292f23baf4db048917a2acd4def9fab4293bc85 Author: Alan Coopersmith Date: Thu Aug 20 13:49:52 2009 -0700 sun_mouse: Don't try calling ioctls if mouse fd wasn't opened Signed-off-by: Alan Coopersmith commit f93c927178a352eec00b3323eb935cc6f27243b0 Author: Alan Coopersmith Date: Thu Aug 20 13:29:25 2009 -0700 Remove check for OS/2 Signed-off-by: Alan Coopersmith commit 1be9e3cf0c491cddfb5985b6b3cc65581313f98f Author: Alan Coopersmith Date: Thu Aug 20 13:26:40 2009 -0700 sun_mouse: Check if streams module is already on the stack before pushing it Signed-off-by: Alan Coopersmith commit bf95ccf496d6674a83c44d559e3eef8729c69449 Author: Dima Kogan Date: Sun Aug 16 22:27:28 2009 -0700 Restrict wheel emulation to a single axis at a time. Wheel emulation works for both horizontal and vertical axes. Thus, if a device doesn't move in perfect straight line, scroll events build up on the respective other axis. In some clients, scroll wheel events have specific meanings other than scrolling (e.g. mplayer). In these clients, erroneous scrolling events come at a high cost. Thus, if a scroll wheel event is generated for one axis, reset the inertia of the other axis to 0, avoiding the buildup of these erroneous scrolling events. Signed-off-by: Dima Kogan Signed-off-by: Peter Hutterer commit 2d43329d778d7bfae5d9c99611ad49efa56716a6 Author: Dima Kogan Date: Sun Aug 16 21:33:43 2009 -0700 Allow 0 as wheel emulation button for unconditional scrolling (#20529) If wheel emulation is on and the emulation button is 0, then any x/y motion of the device is converted into wheel events. The device becomes a scrolling-only device. Signed-off-by: Dima Kogan Signed-off-by: Dima Kogan Signed-off-by: Peter Hutterer commit 0996fd2e3dcac813ad450884e8c117bc4d49b89a Merge: 66bdf8d 8a3f6f7 Author: Charlie Date: Thu Jul 9 10:05:46 2009 +0200 Merge branch 'master' of ssh://mbalmer@git.freedesktop.org/git/xorg/driver/xf86-input-mouse commit 66bdf8d3f289a3ada44c37f3ceb00fc728975cac Author: Charlie Date: Thu Jul 9 08:09:54 2009 +0200 Conditionally declare some variables that are only used conditionally. Reviewed-by: Matthieu Herrn Acked-by: Peter Hutterer commit 8a3f6f75218080b3e7657cb104c6f8e025f358ef Author: Charlie Date: Thu Jul 9 08:09:54 2009 +0200 Conditionally declare some variables that are only used conditionally. commit 2ddc4e9b2882914a56508613fe069c7335c64cc7 Author: Peter Hutterer Date: Thu Jun 18 16:11:47 2009 +1000 Protect against ABI_XINPUT_VERSION 7. Missing the actual button and axis labeling, this can be added at a later point in time. Signed-off-by: Peter Hutterer commit 91bf15dd2af4bf9a83e317b8821bcbbfdba02338 Author: Peter Hutterer Date: Fri May 29 10:07:19 2009 +1000 Remove ModuleInfoRec and associated bits. ModuleInfoRec was removed with 2107becb0ce2ffda001be65728c53563496d8d50 from the server. The MouseOpts were only used from the ModuleInfoRec, they're gone now too. Signed-off-by: Peter Hutterer commit b698a24ab233ec5da2ebd36b5f6f199219de6d44 Author: Peter Hutterer Date: Wed Mar 25 08:37:01 2009 +1000 Remove xf86MouseProtocolIDToName and xf86MouseProtocolNameToID. Both were only used from the xf86-misc extension which is gone from the server as of 1.6. Signed-off-by: Peter Hutterer commit 6887ca0de8314b6029d5df63777b29c46eeb9442 Author: Peter Hutterer Date: Wed Mar 25 08:45:10 2009 +1000 Require xorg-server 1.5.99.901 or higher. 1.6 is the first server release that has the xf86OSmouse.h and related code removed. This code has moved into the mouse driver and attempts of using a mouse driver that provides xf86OSmouse.h with a pre-1.6 xserver may fail. See also: http://lists.freedesktop.org/archives/xorg/2009-March/044501.html Reported-by: Jeremy C. Reed Signed-off-by: Peter Hutterer commit abc65bec5c88acd0a8699920e18473cfa007169f Author: Paulo Cesar Pereira de Andrade Date: Wed Feb 4 20:48:33 2009 -0200 Janitor: use $PKG_CONFIG and update .gitignore. Signed-off-by: Paulo Cesar Pereira de Andrade commit 5058dc340278f2498dd1b4db129dc6dd6b0e0964 Author: Alan Coopersmith Date: Fri Jan 9 18:38:57 2009 -0800 Version 1.4.0 commit 194fed98fee47801f1ca8eb926bc10a57b7582cb Author: Alan Coopersmith Date: Fri Jan 9 14:41:26 2009 -0800 Add note on hal-based configuration to man page commit 299bd6c164e4e91cf69c41b3c7b97879cfcc0d32 Author: Alan Coopersmith Date: Fri Jan 9 08:45:38 2009 -0800 Add copyright notices for OS mouse code to COPYING file commit 0968d56233804515d347b2001bf817d0fa3611ea Author: Alan Coopersmith Date: Thu Jan 8 21:48:13 2009 -0800 Unifdef XFree86LOADER commit 47c5e3a368a2922c4cc5e3a9769501fe399287ae Author: Alan Coopersmith Date: Thu Jan 8 21:43:58 2009 -0800 Remove some #if 1 statements commit 7039165d70079f2e8573ada9323fbc582c825248 Author: Alan Coopersmith Date: Thu Jan 8 21:38:54 2009 -0800 Comment typo fixes commit a61f0f92299037fe818a54c2cd9a2d3836698b43 Author: Alan Coopersmith Date: Thu Jan 8 21:29:00 2009 -0800 sun_mouse: fallback to commonOptions for StreamsModule too commit 4623258b48f01306309ff9d39a85565bce57946e Author: Alan Coopersmith Date: Thu Jan 8 21:21:18 2009 -0800 Clear assorted compiler, sparse & lint warnings mouse.c:1004:35: warning: Using plain integer as NULL pointer sun_mouse.c:325: warning: 'absX' might be used uninitialized in this function sun_mouse.c:325: warning: 'absY' might be used uninitialized in this function sun_mouse.c: (158) warning: constant truncated by assignment declared global, could be static: hardProtocolList mouse.c(3151) softProtocolList mouse.c(3163) serialDefaultsList mouse.c(3366) commit 6f14e8569150b0d6fac7186968cde8b031a1fefc Author: Alan Coopersmith Date: Thu Jan 8 21:20:58 2009 -0800 Add XORG_CWARNFLAGS & XORG_WITH_LINT for more compiler checking commit 24d9306546d325089c5fb6b78b90c24b38c86338 Author: Alan Coopersmith Date: Thu Jan 8 20:40:10 2009 -0800 Replace static changelog with one generated via XORG_CHANGELOG commit cd476cc0932bf9440a05e460cd22dbe584585746 Author: Peter Breitenlohner Date: Wed Nov 19 22:23:34 2008 +0100 Fix linux build HAVE_XORG_CONFIG_H is a leftover from the server sources (where this file used to reside). Signed-off-by: Peter Hutterer commit 003c297d2902092074ede131db0dbc08d9116a5b Author: Alan Coopersmith Date: Mon Dec 1 14:36:06 2008 -0800 sun_mouse: check for Device in commonOptions if pInfo->options isn't set yet commit 1e23b944aae3ef50cc764e6d2f0198deabe790ad Author: Matthieu Herrb Date: Sat Nov 22 17:36:14 2008 +0100 W axis support for bsd_mouse. commit e7e3cd9bed2bfeb848d62062d0859aa813bf786d Author: Matthieu Herrb Date: Fri Nov 21 19:59:22 2008 +0100 prevent a double free of mouse private structure. Mark pInfo->private as NULL after freeing it on the error path. commit c98bc45557174f771b031d4a003b54d06b857785 Author: Matthieu Herrb Date: Fri Nov 21 16:14:01 2008 +0100 Include xorg-server.h to get the WSCONS_SUPPORT define from xerver SDK configuration. commit 87f20b0c06bc13ed603d36cca881ccf69ac0a68a Author: Matthieu Herrb Date: Fri Nov 21 15:42:31 2008 +0100 Build fix: Add a prototype for FindDevice function. commit 790a78d3b3d81ea06fc1a31108a330adba8cc069 Author: Alan Coopersmith Date: Wed Nov 5 21:47:30 2008 -0800 Fix solarisMouseAutoProbe to use device name & protocol specified by HAL commit daac081f34baab7388a8c42e5a80a42cd6810d75 Author: Alan Coopersmith Date: Wed Nov 5 19:26:38 2008 -0800 sun_mouse.c: Use miPointerGetScreen instead of miPointerCurrentScreen commit 431982e7c04ec076eeafd57190db4d7d901efa7c Author: Alan Coopersmith Date: Wed Nov 5 19:04:32 2008 -0800 sun_mouse.c: remove unused variables commit 7bb59519636a7e0028e6f0f63d8256a68a24792d Author: Alan Coopersmith Date: Wed Nov 5 18:55:07 2008 -0800 Remove checks for Solaris x86 versions older than Solaris 8 commit 898dfc9ce731ea9515f7819a9f0583af81d7d8b2 Author: Alan Coopersmith Date: Wed Nov 5 18:51:04 2008 -0800 Rename OS_SOURCES to stop automake complaints about not building program "OS" commit ea5cfe804e112f320f14ad896c7802d53551d3e6 Author: Roland Scheidegger Date: Sat Oct 4 16:02:08 2008 +0200 fix compilation (upper/lower case typo) commit da2ab45e3ee85f164b5430a4d0c5d60cdf71a5ec Author: Eamon Walsh Date: Tue Aug 26 22:39:27 2008 -0400 Change screen private key to an integer variable. Prepares for a devPrivates system that will store an index. commit d4ed78710b19a8b1c9b5349eacd44599ba075527 Author: Alan Coopersmith Date: Tue Aug 19 15:12:52 2008 -0700 Fix sun_mouse.c build on Solaris commit 04730f0be48d464401796a224109adbee9cd51de Author: Adam Jackson Date: Tue Aug 19 15:28:48 2008 -0400 Remove useless call to xf86AddModuleInfo commit f3f0a5520ed7edac3867a97f5a001b91c870563e Author: Daniel Stone Date: Sun Jul 20 04:33:07 2008 +0300 Add OS mouse sources to the driver build Copy across the OS mouse sources and add them to the driver build. For convenience, the OS mouse versioning stuff was removed, but we have always had the same featureset in all modular builds, so that's okay. Only compile-tested, not runtime-tested. commit 1214c4ce571caf0bcdb3d9dc04a2b34f4a23c3c0 Author: Alan Coopersmith Date: Tue Jun 10 14:38:26 2008 -0700 Merge some hardware support information from README.mouse into man page commit 705d0def1092a2121867fae4e7bc944a240d789a Author: Peter Hutterer Date: Mon May 26 21:57:59 2008 +0930 Check for XINPUT ABI 3. commit 5d9d865b4ac2d7739ae93a8e0e682535aeb46b6d Author: Peter Hutterer Date: Mon May 19 20:28:04 2008 +0930 Nuke RCS tags. commit bf634290f7bdf1f5b922f4c28b333a739057f2f0 Author: Paulo Cesar Pereira de Andrade Date: Sun Mar 16 02:28:16 2008 -0300 Compile warning fixes. Ansify a function with K&R style definition. Obey gcc in warning suggest parentheses around assignment used as truth value. Remove some unused variables. Remaining warning is about xf86AddModuleInfo being deprecated. Signed-off-by: Alan Coopersmith commit 7f0623807366b1bc6c0be2e065220be94b669ea7 Author: Paulo Cesar Pereira de Andrade Date: Wed Jan 30 17:28:34 2008 -0200 Make sure xf86MouseProtocolIDToName is of public visibility. This function is called by code in the xf86misc to change mouse parameters, after checking it's availability using LoaderSymbol(). Signed-off-by: Alan Coopersmith commit 82231d2309a54ecf7de3f29809416b2ea5f2d3cd Author: Peter Hutterer Date: Tue Apr 15 15:54:17 2008 +0930 man: Note that the server may probe default "Device" options. X.Org Bug 15245 commit 9192640066e3917062cb3ee1c761a83196bfb721 Author: Adam Jackson Date: Thu Mar 20 16:26:52 2008 -0400 mouse 1.3.0 commit d6ceabc1b58d752cb2af03519c15012206904f70 Author: Matthieu Herrb Date: Sat Mar 8 23:10:03 2008 +0100 Makefile.am: nuke RCS Id commit 78272e117ceea12b8863f31688da66b20e160311 Author: Alan Coopersmith Date: Thu Jan 3 13:27:02 2008 -0800 Update Emulate3Button default in mouse man page to cover Emulate3ButtonsSoft commit 6a03e8bd9699a33dabcdd2bbcf51a001ddfd5534 Author: Peter Hutterer Date: Fri Nov 16 16:45:45 2007 +1030 Bug #13144: Don't flush buttons, release events can cause paste events. commit 76a2231f87551f7c1943df18bc537b9b15987562 Author: Adam Jackson Date: Mon Dec 3 11:59:12 2007 -0500 Don't sleep(0.3) on shutdown. commit 0352a4db368eaab2df5fa77d4003e1363b3ea4fb Author: Tilman Sauerbeck Date: Wed Oct 3 14:06:50 2007 +0200 Bumped version to 1.2.3. commit f42ea3027c13046dfa7a603737b476fbf2833764 Author: Fredrik Rinnestam Date: Wed Sep 19 23:24:13 2007 +0200 Bug #12145: Don't confine the pointer to one screen in zaphod mode. Fix ported from evdev's b4a5a20476f7bc77d54a860d7cdd81c223bdb81f. commit 53bdd4db01f05595beb37e68842118eb649308d3 Author: Daniel Drake Date: Tue May 29 12:14:00 2007 -0800 Bug #11089: xf86-input-mouse COPYING file X.Org Bugzilla #11089 commit 111081a2f15b416c2fd05b667bca3b3982f93245 Author: Matthias Hopf Date: Wed Aug 1 15:55:51 2007 +0200 bump to 1.2.2 commit 8d329a4a23cdaa970e41fa33ee2babc4687189f2 Author: Brice Goglin Date: Wed Jul 25 19:22:27 2007 +0200 Fix typo in mousedrv.man Reported by "A. Costa" in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432060 commit c7c012d8bf735dfa894146b379a2e1fd55f57fca Author: Drew Parsons Date: Thu Jun 14 00:24:07 2007 +1000 Update version using PACKAGE_VERSION_* commit e567cb0792ea3dc2cd68c46628332c1f8bbb173d Author: Jürgen Appel Date: Mon Apr 23 15:54:08 2007 +0200 Added "Sensitivity" option. Use for slowing down high resolution mice. commit 4666e5f14b2cb63f5cd7c863331fe69658c989df Author: Alan Coopersmith Date: Mon Feb 26 13:36:15 2007 -0800 renamed: .cvsignore -> .gitignore commit 92a8e2a39d7c9d6bfdaa0a5ac0118599008638ff Author: Alan Coopersmith Date: Mon Feb 26 13:35:42 2007 -0800 Update text version of README to match sgml Oops - forgot to regen text when the sgml changes were checked in for commit 28c5410df7ba8af07b994c0907519e869c9df750 commit e355dc2e04b1b4756d4ad8553794b4e97210000c Author: Daniel Stone Date: Thu Nov 30 19:57:28 2006 +0200 bump to 1.2.1 commit fb347fb74e1a50fa900f225d13eee1aa829fa2f9 Author: Matthias Hopf Date: Thu Nov 23 18:17:33 2006 +0100 Work around race condition during VT switch. https://bugzilla.novell.com/show_bug.cgi?id=219946 commit 7a866ae143c3638d6b1e3836d48f16e300e90b09 Author: Daniel Stone Date: Thu Nov 2 04:47:12 2006 +0200 bump to 1.2.0 commit ddc0db4fe85e2b8de31ad67a6d4f97808bce018f Author: Daniel Stone Date: Thu Nov 2 00:07:01 2006 +0200 port to new motion history api, add right number of args to IPDS Use new motion history API from the DIX if available, and also use the right number of args to InitPointerDeviceStruct, depending on the ABI version. commit 167dbbc2af6cad5d3b320e4e384bd78dd3450a5c Author: Adam Jackson Date: Fri Oct 13 18:28:46 2006 -0400 Bump to 1.1.2 commit 40cfeffc5bea7ecdc20bbbe4db50fd725a62f29b Author: Daniel Stone Date: Sun Aug 27 13:06:31 2006 +0300 move manpage to mousedrv.man to avoid conflict with mouse.4 commit ac0dc7451be0a8aba703fd4d9a78e17544c40842 Author: Tilman Sauerbeck Date: Sun Jul 9 20:01:26 2006 +0200 Bug #5285: added some missing includes, avoid redefinition of NEED_XF86_TYPES. commit 6dbc6ad05d147831a62b161e23f5da29101f2cfa Author: Matthias Hopf Date: Fri May 26 13:55:39 2006 +0000 Bump to 1.1.1. commit 12bd04878774154fe83d785418b87dd37b4f2f15 Author: Matthias Hopf Date: Fri Apr 21 11:15:23 2006 +0000 Fixed default for YAxisMapping. Changed default for ZAxisMapping. Added short explanation. Autodetect (one way only) single wheel only for EXPS2. Use singlebit protocol for multiwheel EXPS2 mice. commit 2ce9bbe76c788fe7c41d2607577c867e5a3d9608 Author: Matthias Hopf Date: Thu Apr 20 18:25:32 2006 +0000 Overhaul of wheel processing. Does work correctly with multibit zaxis events now. commit 5e9624b3695cf37fff7986d1585e4227bad789f5 Author: Adam Jackson Date: Fri Apr 7 17:59:54 2006 +0000 Unlibcwrap. Bump server version requirement. Bump to 1.1.0. commit 270fe8e1ccd2f5af114e8292bee8c4d27a1d93ab Author: Eric Anholt Date: Mon Apr 3 21:18:50 2006 +0000 Coverity #875: Correct several memory leaks in options parsing. commit abe3a020a70859f680163a8105cebeac42695f72 Author: Adam Jackson Date: Tue Feb 28 19:44:45 2006 +0000 Bump to 1.0.4. commit 6de7233e0fdb63d4794df45d76391a4a6f04ec8d Author: Matthias Hopf Date: Thu Feb 2 11:53:50 2006 +0000 Fixed ButtonMapping default. commit 9ec6a9a1c1b01e37ea60611160a4c15c2f308086 Author: Matthias Hopf Date: Tue Jan 17 11:49:57 2006 +0000 Bug #5071: EmulateWheelTimeout didn't work as anticipated. commit 745e3d38594938742f16508a61bd0ce9598fcf30 Author: Daniel Stone Date: Mon Jan 9 02:30:15 2006 +0000 Remove unconditionally-defined #ifdef PNP_MOUSE blocks. commit b9db086daae7aacae068e4db85575737ebe76f45 Author: Kevin E Martin Date: Wed Dec 21 02:29:57 2005 +0000 Update package version for X11R7 release. commit d84b58ede20c31f4acbf886197c92b6f69d32da8 Author: Adam Jackson Date: Mon Dec 19 16:25:51 2005 +0000 Stub COPYING files commit 28c5410df7ba8af07b994c0907519e869c9df750 Author: Alan Coopersmith Date: Mon Dec 19 09:07:50 2005 +0000 Typo fixes, mailing list & url updates, and other changes to prepare for X11R6.9 & 7.0 releases. commit c231bba8457cbe98c516f0ee90ebc2c4b5a936a9 Author: Kevin E Martin Date: Thu Dec 15 00:21:33 2005 +0000 Update package version number for final X11R7 release candidate. Bump driver version number. commit c356477c8dab15a68fa6deb06181c28d2e9d1c54 Author: Kevin E Martin Date: Mon Dec 12 06:59:54 2005 +0000 Bug #1752: When emulating 3 buttons in "auto" mode, timeout immediately when a mouse movement is detected (Egbert Eich, Kean Johnston, Kevin Martin). commit 4180beef7023dc3a860dd9895c986317326c5236 Author: Kevin E Martin Date: Tue Dec 6 22:48:31 2005 +0000 Change *man_SOURCES ==> *man_PRE to fix autotools warnings. commit bef647bfb75c9be08046ba041e775e2be483bc05 Author: Kevin E Martin Date: Sat Dec 3 05:49:31 2005 +0000 Update package version number for X11R7 RC3 release. commit e8f1d1cc8f021c8034087c7d2d26a945fda41467 Author: Kevin E Martin Date: Sat Dec 3 05:45:18 2005 +0000 Bump version numbers for X11R6.9/X11R7 RC3. commit 1e537674ebd4df0b7245b4b2119bcf33be9d3f51 Author: Kevin E Martin Date: Fri Dec 2 02:16:06 2005 +0000 Remove extraneous AC_MSG_RESULT. commit 7b4b12a977e4c84d861f103613245570f34d31ce Author: Adam Jackson Date: Tue Nov 29 23:29:56 2005 +0000 Only build dlloader modules by default. commit 1c95c00528b69db9a2345af0bcc871f63e2b8d89 Author: Alan Coopersmith Date: Mon Nov 28 22:04:07 2005 +0000 Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4 update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir) commit 90cda6b6d1f9e8db9d77423943b663e3e010b06c Author: Daniel Stone Date: Tue Nov 22 04:03:23 2005 +0000 Bump dependency on xorg-server to >= 0.99.3 for MouseDeviceRec changes. commit 4b37d5d1d2f80da983346e15e900fb07de7d2cf8 Author: Eric Anholt Date: Mon Nov 21 10:49:06 2005 +0000 Add .cvsignores for drivers. commit 31c63c83f7dbe8c538d67d3f9a1e3064ea78e278 Author: Matthias Hopf Date: Mon Nov 14 14:25:09 2005 +0000 Bug #4915: ButtonMapping default changed from one-to-one mapping to "1 2 3 8 9 10 11...". commit 5bca72458c8f9637f9c8f0871bb2048d824c6974 Author: Matthias Hopf Date: Mon Nov 14 14:19:52 2005 +0000 Bug #4915: Move buttonMapping initialization before calling OS specific PreInit. commit f00e2a8c9689465f6e173e08d0b51407e19f385b Author: Alan Coopersmith Date: Thu Nov 10 03:37:47 2005 +0000 Unrevert default ZAxisMapping change now that the default is back to "4 5 6 7" commit 77975bfe30f984f45f908d22a0e9c8fa0311aef0 Author: Kean Johnson Date: Thu Nov 10 02:41:20 2005 +0000 Dont pass wheel mouse buttons as real buttons, map them as Z-Axis movement on SCO and USL. Re-instate the ZAxisMapping default for the mouse driver. commit aa6bdb84ec4d22f0916b1e471b89d056a684d7d4 Author: Kevin E Martin Date: Wed Nov 9 21:31:23 2005 +0000 Bump version numbers for X11R6.9/X11R7 RC2. commit f8bf605528c78c1cb6670ee096837e5c04e1b61a Author: Kevin E Martin Date: Wed Nov 9 21:15:12 2005 +0000 Update package version number for X11R7 RC2 release. commit 75a30c52706057cd70407271eda647c699a5a66d Author: Matthias Hopf Date: Wed Nov 9 17:05:40 2005 +0000 Bug #4915: ButtonMapping option which allows to define arbitrary button mappings (including left-handed mouse etc.). Fixed incorrect usage of non-reversed, but ZAxisMapped buttons for state detection. Nuked unused part of reverseMap. commit 2372fba8f5f6e8d3bfa48edc980f2186fc9e87ee Author: Matthias Hopf Date: Wed Nov 9 16:32:51 2005 +0000 Reflect changes in ZAxisMapping default. commit 823f49c8238595a377f7d0494d742f5e50d34eca Author: Kean Johnson Date: Tue Nov 8 06:33:28 2005 +0000 See ChangeLog entry 2005-11-07 for details. commit 640006296296b33dceaf33675a4db3335765aac6 Author: Kevin E Martin Date: Tue Nov 1 15:08:50 2005 +0000 Update pkgcheck depedencies to work with separate build roots. commit 8dca995860193bc3132301f1b0f79ada06bffd4c Author: Kevin E Martin Date: Wed Oct 19 02:48:01 2005 +0000 Update package version number for RC1 release. commit 9dffd55847ebac6b381d8359ad67f056fb66cf2b Author: Alan Coopersmith Date: Tue Oct 18 00:01:52 2005 +0000 Use @DRIVER_MAN_SUFFIX@ instead of $(DRIVER_MAN_SUFFIX) in macro substitutions to work better with BSD make commit 08905305e064e8f20e5db529b850aaa87b578b2c Author: Adam Jackson Date: Mon Oct 17 22:57:29 2005 +0000 More 1.7 braindamage: define EXTRA_DIST in terms of @DRIVER_NAME@ instead of indirectly commit bcabac6b1f0c39e20bca6e1abd4efe70d7eeac69 Author: Alan Coopersmith Date: Mon Oct 17 00:08:59 2005 +0000 Use sed & cpp to substitute variables in driver man pages commit 34856ca1f73108ca19c20d9223457be328890dc1 Author: Søren Sandmann Pedersen Date: Tue Oct 4 20:01:02 2005 +0000 Check in generated README files commit 55e29446456e51ccdca57f348ed4660f65ab7dee Author: Søren Sandmann Pedersen Date: Mon Oct 3 21:22:06 2005 +0000 - For all drivers that have a .sgml file, add code in their build system to build the README file at make dist time - in util/macros/xorg-macros.m4, add a new XORG_CHECK_LINUXDOC macro that will check if the required tools and files exist, and if so set a conditional. - util/modular/symlink.sh - Link all the .sgml to xf86-video-/README.sgml - Add all the README. to the list of excluded files - xc/programs/Xserver/hw/xfree86/doc/sgml/SiS.sgml: Various changes to make it spew less warnings when the text file is built. commit 79a6d468c7995032988a3888324fddf798021553 Author: Alex Deucher Date: Wed Aug 31 23:38:47 2005 +0000 Fix EmulateWheelTimeout Option. Spotted by Richard Neill, bug 4291 commit 70e4c1b572ea98e9cdf85b4c5ea3b63a89647d3d Author: Daniel Stone Date: Fri Aug 26 07:12:34 2005 +0000 Extend Genius NetMouse support. (Debian #040) commit 8227eb1ff74c7c61690359e2af00a5a6c23b56e9 Author: Daniel Stone Date: Thu Aug 18 09:03:40 2005 +0000 Update autogen.sh to one that does objdir != srcdir. commit 4b08d9746296a4d9fc756a059f2bfba3490192a6 Author: Alan Coopersmith Date: Mon Aug 15 23:48:35 2005 +0000 Set ZAxisMapping default to "4 5 6 7". commit f355ef63c60adc7a72517ca71fdc9983f3881db9 Author: Søren Sandmann Pedersen Date: Wed Aug 10 14:07:23 2005 +0000 Don\'t lose existing CFLAGS in all the input drivers and some of the video drivers commit fd37fdea221cdf13a26e075758c9d1b405da5c06 Author: Kevin E Martin Date: Fri Jul 29 21:22:41 2005 +0000 Various changes preparing packages for RC0: - Verify and update package version numbers as needed - Implement versioning scheme - Change bug address to point to bugzilla bug entry form - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to reenable it) - Fix makedepend to use pkgconfig and pass distcheck - Update build script to build macros first - Update modular Xorg version commit 0159c76ac33cc7072a5b30129b5b622053f23b08 Author: Kevin E Martin Date: Wed Jul 13 20:03:22 2005 +0000 Make the module dir configurable commit 84c284202386be7c46d60cfa8a58f031d05ac84f Author: Kevin E Martin Date: Tue Jul 12 23:16:59 2005 +0000 Update driver to pass distcheck commit e955a67245f83da020632a2bf82c04c03a697322 Author: Adam Jackson Date: Tue Jul 12 06:15:09 2005 +0000 Build skeletons for input drivers. Should basically work. commit 5f673ca035ec1c3c4abdc162f50c864c89ed84d4 Author: Adam Jackson Date: Mon Jul 11 02:38:00 2005 +0000 Prep input drivers for modularizing by adding guarded #include "config.h" commit c2bc3b67c121ffb1152333e268b675643f9f477f Author: Daniel Stone Date: Fri Jul 1 22:43:23 2005 +0000 Change all misc.h and os.h references to . commit 25eb972e71e11208cd6426f5583d33490d82829d Author: Adam Jackson Date: Sat Jun 25 21:17:02 2005 +0000 Bug #3626: _X_EXPORT tags for video and input drivers. commit e9fd033c9c6903b681f1e82c3cd03098c3fbf2a4 Author: Eric Anholt Date: Mon May 9 23:41:06 2005 +0000 Bugzilla #2389: Document the maximum number of buttons a mouse can have. Correct a missing period I noticed while I was here. commit 0367a3a65a30fa461a1f2c4facf28821dbf10a77 Author: Eric Anholt Date: Wed May 4 04:14:58 2005 +0000 Port X.Org to FreeBSD/powerpc. This makes a bit of math for sysmouse in mouse.c explicitly signed, avoiding the need for -fsigned-chars. (Peter Grehan, grehan at FreeBSD dot org) commit b538c125e4cd103c743ed26ec4d288d4a5b35b24 Author: Daniel Stone Date: Wed Apr 20 12:25:34 2005 +0000 Fix includes right throughout the Xserver tree: change "foo.h" to for core headers, e.g. X.h, Xpoll.h; change "foo.h", "extensions/foo.h" and "X11/foo.h" to for extension headers, e.g. Xv.h; change "foo.[ch]" to for Xtrans files. commit 39eeceba31b6a8b42be175db472c92b4aebb82c6 Author: Alex Deucher Date: Sun Oct 17 22:45:57 2004 +0000 - Fix DFP detection in r128 driver (bug 1386, Klaus Kusche) - Fix EmulateWheelInertia defaults (bug 1115, Andrew Pimlott) commit a257b41d741b49268c55e739b6d793be3de6586a Author: Alex Deucher Date: Sun Oct 17 20:29:35 2004 +0000 - Add interlaced support to S3 driver (bug 332, Leo Savernik) - EmulateWheelTimeout (bug 323, Mathias Fröhlich) - single button double-click (bug 322, Rob Brown) commit 1a49e855396dd927dc69c63c2a32e115fd8f504c Author: Kevin E Martin Date: Fri Sep 3 16:18:23 2004 +0000 First set of documentation updates. Include more correct fix for rootless interaction with damage (Bug #1168, Keith Packard). commit 014853d848b04ce496afc8ff3f0273872e8f761a Author: Alan Coopersmith Date: Mon Jul 26 23:20:22 2004 +0000 - Change xf86config to xorgconfig - Update Solaris mouse support information commit 4ef4fa01917112bd937b32793ade3230de0b0d4b Author: Matthieu Herrb Date: Sat Jul 24 17:35:39 2004 +0000 Fix a problem with wsmouse driver loosing events on 64bit architectures (XFree86 Bugzilla #1438, John Heasley). "To fix this, I've added a mouse buffer (Xisb buffer) "scale" value to the MouseDevPtr type. If set, it is used as structure size of which we want space for a few." commit 3fed730ac9f9b95503bc457d8688896cbda502f1 Author: Egbert Eich Date: Fri Apr 23 19:54:04 2004 +0000 Merging XORG-CURRENT into trunk commit 3e37718d9046394e1f89df80c9280727681c2b59 Author: Egbert Eich Date: Sun Mar 14 08:33:52 2004 +0000 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 commit 2714a22dc4f13db3bf1a050d403cb3b2692a6d20 Author: Egbert Eich Date: Wed Mar 3 12:12:34 2004 +0000 Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 commit fb74889ec7baa2bf9162f43517d6db36414a5c32 Author: Egbert Eich Date: Thu Feb 26 13:36:00 2004 +0000 readding XFree86's cvs IDs commit be8481276bdfee635dd3e4da33e65780aa5b7660 Author: Egbert Eich Date: Thu Feb 26 09:23:34 2004 +0000 Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 commit 53bc8cd30c7ef1f888db318ad174ff4f028ce634 Author: Kaleb Keithley Date: Fri Dec 19 20:55:25 2003 +0000 XFree86 4.3.99.902 (RC 2) commit 8e2fe5d5a02c4c8da8f4ced432da6fe88272b975 Author: Kaleb Keithley Date: Tue Nov 25 19:28:48 2003 +0000 XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks commit 92595648d1140139f0c0a42cbb2c548fc6864575 Author: Kaleb Keithley Date: Fri Nov 14 16:48:56 2003 +0000 XFree86 4.3.0.1 commit c9c7e96897229ba1d457a58f66121dd1f9210382 Author: Kaleb Keithley Date: Fri Nov 14 16:48:56 2003 +0000 Initial revision commit 95b194f6e3456b46c2f994f4f6655fabfcf89c76 Author: Kaleb Keithley Date: Fri Nov 14 15:54:49 2003 +0000 R6.6 is the Xorg base-line xf86-input-mouse-1.9.0/README0000664003204500007640000011613711461151107012415 00000000000000 Mouse Support in xf86-input-mouse Original version written by Kazutaka Yokota for XFree86 on 17 December 2002 Updated by Alan Coopersmith for X.Org releases ____________________________________________________________ Table of Contents 1. Introduction 2. Supported Hardware 3. OS Support for Mice 3.1 Summary of Supported Mouse Protocol Types 3.2 BSD/OS 3.3 FreeBSD 3.4 FreeBSD(98) 3.5 Interactive Unix 3.6 Linux 3.7 Linux/98 3.8 LynxOS 3.9 NetBSD 3.10 NetBSD/pc98 3.11 OpenBSD 3.12 OS/2 3.13 SCO 3.14 Solaris 3.15 SVR4 3.16 PANIX 4. Configuring Your Mouse 5. xorg.conf Options 5.1 Buttons 5.2 ZAxisMapping 5.3 Resolution 5.4 Drag Lock Buttons 6. Mouse Gallery 6.1 MS IntelliMouse (serial, PS/2) 6.2 MS IntelliMouse Explorer (PS/2, USB) 6.3 Kensington Thinking Mouse and Kensington Expert Mouse (serial, PS/2) 6.4 Genius NetScroll (PS/2) 6.5 Genius NetMouse and NetMouse Pro (serial, PS/2) 6.6 Genius NetScroll Optical (PS/2, USB) 6.7 ALPS GlidePoint (serial, PS/2) 6.8 ASCII MieMouse (serial, PS/2) 6.9 Logitech MouseMan+ and FirstMouse+ (serial, PS/2) 6.10 IBM ScrollPoint (PS/2) 6.11 8D ScrollMouse (serial, PS/2) 6.12 A4 Tech 4D mice (serial, PS/2, USB) 7. Configuration Examples ______________________________________________________________________ 1. Introduction This document describes mouse support in the xf86-input-mouse driver for the Xorg X server. This driver is mainly used on non-Linux operating systems such as BSD & Solaris, as modern Linux systems use the xf86-input-evdev driver instead. Mouse configuration has often been mysterious task for novice users. However, once you learn several basics, it is straightforward to write the mouse "InputDevice" section in the xorg.conf file by hand. 2. Supported Hardware The xf86-input-mouse driver supports four classes of mice: serial, bus and PS/2 mice, and additional mouse types supported by specific operating systems, such as USB mice. Serial mouse The serial mouse was once the most popular pointing device for PCs. There have been numerous serial mouse models from a number of manufactures. Despite the wide range of variations, there have been relatively few protocols (data format) with which the serial mouse talks to the host computer. The modern serial mouse conforms to the PnP COM device specification so that the host computer can automatically detect the mouse and load an appropriate driver. The X server supports this specification and can detect popular PnP serial mouse models on most platforms. Bus mouse The bus mouse connects to a dedicated interface card in an expansion slot. Some video cards, notably those from ATI, and integrated I/O cards may also have a bus mouse connector. Some bus mice are known as `InPort mouse'. Note that some mouse manufacturers have sold a package including a serial mouse and a serial interface card. Don't confuse this type of products with the genuine bus mouse. PS/2 mouse They are sometimes called `Mouse-port mouse'. The PS/2 mouse was common for a generation after serial mice, and most laptops still use the PS/2 protocol for built-in pointer devices. The PS/2 mouse is an intelligent device and may have more than three buttons and a wheel or a roller. The PS/2 mouse is usually compatible with the original PS/2 mouse from IBM immediately after power up. The PS/2 mouse with additional features requires a specialized initialization procedure to enable these features. Without proper initialization, it behaves as though it were an ordinary two or three button mouse. USB mouse USB (Universal Serial Bus) ports are present on most modern computers. Several devices can be plugged into this bus, including mice and keyboards. This driver includes support for USB mice on some systems. Many mice nowadays can be used both as a serial mouse and as a PS/2 mouse, or as both a PS/2 and a USB mouse. They have logic to distinguish which interface it is connected to. However, a mouse which is not marketed as compatible with both mouse interfaces lacks this logic and cannot be used in such a way, even if you can find an appropriate adapter with which you can connect the mouse to a different format port. This driver supports a mouse with a wheel, a roller or a knob. Its action is detected as the Z (third) axis motion of the mouse. As the X server or clients normally do not use the Z axis movement of the pointing device, a configuration option, "ZAxisMapping", is provided to assign the Z axis movement to another axis or a pair of buttons (see below). 3. OS Support for Mice 3.1. Summary of Supported Mouse Protocol Types Protocol Types serial PnP BusMouse PS/2 Extended PS/2 OS platforms protocols serial protocol protocol protocols "Auto" "BusMouse" "PS/2" "xxxPS/2" USB ------------------------------------------------------------------------- BSD/OS Ok ? ? ? ? ? FreeBSD Ok Ok Ok Ok SP*1 SP*1 FreeBSD(98) Ok ? Ok NA NA ? Interactive Unix Ok NA ?*1 ?*1 NA ? Linux Ok Ok Ok Ok Ok ? Linux/98 Ok ? Ok NA NA ? LynxOS Ok NA Ok Ok NA ? NetBSD Ok Ok Ok SP*1 SP*1 SP*1 NetBSD/pc98 Ok ? Ok NA NA NA OpenBSD Ok Ok Ok Ok*1 Ok*1 Ok*1 SCO Ok ? SP*1 SP*1 NA ? Solaris 2.x Ok NA*1 ?*1 Ok Ok SP*1 SVR4 Ok NA*1 SP*1 SP*1 NA ? PANIX Ok ? SP*1 SP*1 NA ? Ok: support is available, NA: not available, ?: untested or unknown. SP: support is available in a different form *1 Refer to the following sections for details. 3.2. BSD/OS No testing has been done with BSD/OS. 3.3. FreeBSD FreeBSD supports the "SysMouse" protocol which must be specified when the moused daemon is running in versions 2.2.1 or later. When running the mouseddaemon, you must always specify the /dev/sysmouse device and the "SysMouse" protocol to the X server, regardless of the actual type of your mouse. FreeBSD versions 2.2.6 or later include the kernel-level support for extended PS/2 mouse protocols and there is no need to specify the exact protocol name to the X server. Instead specify the "PS/2" or "Auto" protocol and the X server will automatically make use of the kernel-level support. In fact, "Auto" protocol support is really efficient in these versions. You may always specify "Auto" to any mouse, serial, bus or PS/2, unless the mouse is an old serial model which doesn't support PnP. FreeBSD versions 2.2.5 or earlier do not support extended PS/2 mouse protocols ("xxxPS/2"). Always specify the "PS/2" protocol for any PS/2 mouse in these versions regardless of the brand of the mouse. FreeBSD versions 3.1 or later have support for USB mice. Specify the "Auto" protocol for the /dev/ums0 device. (If the moused daemon is running for the USB mouse, you must use /dev/sysmouse instead of /dev/ums0 as explained above.) See the ums(4) manual page for details. 3.4. FreeBSD(98) The PS/2 mouse is not supported. 3.5. Interactive Unix The PnP serial mouse support (the "Auto" protocol) is not supported for the moment. The bus mouse and PS/2 mouse should be supported by using the appropriate device drivers. Use /dev/mouse for the "BusMouse" protocol and /dev/kdmouse for the "PS/2" protocol. These protocols are untested but may work. Please send success/failure reports to 3.6. Linux All protocol types should work. 3.7. Linux/98 The PS/2 mouse is not supported. 3.8. LynxOS The PnP serial mouse support (the "Auto" protocol) is disabled in LynxOS, because of limited TTY device driver functionality. 3.9. NetBSD NetBSD 1.3.x and former does not support extended PS/2 mouse protocols ("xxxPS/2"). The PS/2 mouse device driver /dev/pms emulates the bus mouse. Therefore, you should always specify the "BusMouse" protocol for any PS/2 mouse regardless of the brand of the mouse. The "wsmouse" protocol introduced in NetBSD 1.4 along with the wscons console driver is supported. You need to run binaries compiled on NetBSD 1.4 to have support for it though. Use "/dev/wsmouse0" for the device. Refer to the wsmouse(4) manual page for kernel configuration informations. This driver also provides support for USB mice. See the ums(4) manual page for details. 3.10. NetBSD/pc98 The PS/2 mouse is not supported. 3.11. OpenBSD The raw PS/2 mouse device driver /dev/psm0 uses the raw PS/2 mouse protocol. OpenBSD 2.2 and earlier does not support extended PS/2 mouse protocols ("xxxPS/2") . Therefore, you should specify the "PS/2" protocol for any PS/2 mouse regardless of the brand of the mouse. OpenBSD 2.3 and later support all extended PS/2 mouse protocols. You can select the "Auto" protocol for PnP PS/2 mice or any specific extended ("xxxPS/2") protocol for non PnP mice. There is also a cooked PS/2 mouse device driver /dev/pms0 which emulates the bus mouse. Specify the "BusMouse" protocol for any PS/2 mouse regardless of the brand of the mouse when using this device. XFree86 3.3.6 support USB mice on OpenBSD 2.6 and later though the generic Human Interface Device (hid) /dev/uhid*. Select the "usb" protocol and the /dev/uhid* instance corresponding to your mouse as the device name. 3.12. OS/2 X11R7.5/OS2 always uses the native mouse driver of the operating system and will support any type of pointer that the OS supports, whether it is serial, bus mouse, or PnP type. If the mouse works under Presentation Manager, it will also work under X11R7.5/OS2. Always specify "OSMouse" as the protocol type. 3.13. SCO The bus and PS/2 mouse are supported with the "OSMouse" protocol type. The "OSMouse" may also be used with the serial mouse. 3.14. Solaris Testing has been done with Solaris 2.5.1, 2.6, 7, 8, 9, 10, and 11. On Solaris 10 1/06 and later versions with "virtual mouse" support, all PS/2 and USB mice connected to the system can be accessed via the /dev/mouse device using the VUID protocol, including USB mice plugged in after the X server is started. On older releases or to address mice individually, specific devices and protocols may be used. Logitech and Microsoft bus mice have not been tested, but might work with the /dev/logi and /dev/msm devices. Standard 2 and 3 button PS/2 mice work with the "PS/2" protocol type and the /dev/kdmouse device. USB mice work with the "VUID" protocol type and the /dev/mouse device. The PnP serial mouse support via the "Auto" protocol has been tested and does not work. The "Auto" protocol can however detect PS/2 and USB mice correctly. Additional USB mice can be connected using the "VUID" protocol type and the appropriate "/dev/usb/hid" device with the Option "StreamsModule" "usbms" line included in the associated "InputDevice" section. 3.15. SVR4 The bus and PS/2 mouse may be supported with the "Xqueue" protocol type. The "Xqueue" may also be used with the serial mouse. The PnP serial mouse support (the "Auto" protocol) is not tested. 3.16. PANIX The PC/AT version of PANIX supports the bus and PS/2 mouse with the "Xqueue" protocol type. The PC-98 version of PANIX supports the bus mouse with the "Xqueue" protocol type. 4. Configuring Your Mouse Before editing the xorg.conf file to set up mouse configuration, you must identify the interface type, the device name and the protocol type of your mouse. Blindly trying every possible combination of mouse settings will lead you nowhere. The first thing you need to know is the interface type of the mouse you are going to use. It can be determined by looking at the connector of the mouse. The serial mouse has a D-Sub female 9- or 25-pin connector. The bus mice have either a D-Sub male 9-pin connector or a round DIN 9-pin connector. The PS/2 mouse is equipped with a small, round DIN 6-pin connector. USB mice have a thin rectangular connector. Some mice come with adapters with which the connector can be converted to another. If you are to use such an adapter, remember that the connector at the very end of the mouse/adapter pair is what matters. The next thing to decide is a device node to use for the given interface. For the bus and PS/2 mice, there is little choice; your OS most possibly offers just one device node each for the bus mouse and PS/2 mouse. There may be more than one serial port to which the serial mouse can be attached. The next step is to guess the appropriate protocol type for the mouse. The X server may be able to select a protocol type for the given mouse automatically in some cases. Otherwise, the user has to choose one manually. Follow the guidelines below. Bus mouse The bus and InPort mice always use "BusMouse" protocol regardless of the brand of the mouse. Some OSs may allow you to specify "Auto" as the protocol type for the bus mouse. PS/2 mouse The "PS/2" protocol should always be tried first for the PS/2 mouse regardless of the brand of the mouse. Any PS/2 mouse should work with this protocol type, although wheels and other additional features are unavailable in the X server. After verifying the mouse works with this protocol, you may choose to specify one of "xxxPS/2" protocols so that extra features are made available in the X server. However, support for these PS/2 mice assumes certain behavior of the underlying OS and may not always work as expected. Support for some PS/2 mouse models may be disabled all together for some OS platforms for this reason. Some OSs may allow you to specify "Auto" as the protocol type for the PS/2 mouse and the X server will automatically adjust itself. Serial mouse The server supports a wide range of mice, both old and new. If your mouse is of a relatively new model, it may conform to the PnP COM device specification and the X server may be able to detect an appropriate protocol type for the mouse automatically. Specify "Auto" as the protocol type and start the X server. If the mouse is not a PnP mouse, or the X server cannot determine a suitable protocol type, the server will print the following error message and abort. : cannot determine the mouse protocol If the X server generates the above error message, you need to manually specify a protocol type for your mouse. Choose one from the following list: o GlidePoint o IntelliMouse o Logitech o Microsoft o MMHittab o MMSeries o MouseMan o MouseSystems o ThinkingMouse When you choose, keep in mind the following rule of thumb: 1. "Logitech" protocol is for old serial mouse models from Logitech. Modern Logitech mice use either "MouseMan" or "Microsoft" protocol. 2. Most 2-button serial mice support the "Microsoft" protocol. 3. 3-button serial mice may work with the "Mousesystems" protocol. If it doesn't, it may work instead with the "Microsoft" protocol although the third (middle) button won't function. 3-button serial mice may also work with the "Mouseman" protocol under which the third button may function as expected. 4. 3-button serial mice may have a small switch at the bottom of the mouse to choose between ``MS'' and ``PC'', or ``2'' and ``3''. ``MS'' or ``2'' usually mean the "Microsoft" protocol. ``PC'' or ``3'' will choose the "MouseSystems" protocol. 5. If the serial mouse has a roller or a wheel, it may be compatible with the "IntelliMouse" protocol. 6. If the serial mouse has a roller or a wheel and it doesn't work with the "IntelliMouse" protocol, you have to use it as a regular 2- or 3-button serial mouse. If the "Auto" protocol is specified and the mouse seems to be working, but you find that not all features of the mouse are available, that is because the X server does not have native support for that model of mouse and is using a ``compatible'' protocol according to PnP information. If you suspect this is the case with your mouse, please enter a bug report at http://bugzilla.freedesktop.org, using the xorg product. USB mouse If your mouse is connected to the USB port, it can either be supported by the "Auto" protocol, or by an OS-specific protocol (see below), or as a generic Human Interface Device by the "usb" protocol. Standardized protocols Mouse device drivers in your OS may use the standardized protocol regardless of the model or the class of the mouse. For example, SVR4 systems may support "Xqueue" protocol. In FreeBSD the system mouse device /dev/sysmouse uses the "SysMouse" protocol. Please refer to the OS support section of this file for more information. 5. xorg.conf Options The old Pointer section has been replaced by a more general InputDevice section. The following is a minimal example of an InputDevice section for a mouse: Section "InputDevice" Identifier "Mouse 1" Driver "mouse" Option "Device" "/dev/mouse" Option "Protocol" "Auto" EndSection The mouse driver supports the following config file options: 5.1. Buttons This option tells the X server the number of buttons on the mouse. Currently there is no reliable way to automatically detect the correct number. This option is the only means for the X server to obtain it. The default value is three. Note that if you intend to assign Z axis movement to button events using the ZAxisMapping option below, you need to take account of those buttons into N too. Option "Buttons" "N" 5.2. ZAxisMapping This option maps the Z axis (wheel) motion to buttons or to another axis. Option "ZAxisMapping" "X" Option "ZAxisMapping" "Y" Option "ZAxisMapping" "N1 N2" Option "ZAxisMapping" "N1 N2 N3 N4" The first example will map the Z axis motion to the X axis motion. Whenever the user moves the wheel/roller, its movement is reported as the X axis motion. When the wheel/roller stays still, the real X axis motion is reported as is. The third example will map negative Z axis motion to the button N1 and positive Z axis motion to the button N2. If this option is used and the buttons N1 or N2 actually exists in the mouse, their actions won't be detected by the X server. The last example is useful for the mouse with two wheels of which the second wheel is used to generate horizontal scroll action, and the mouse which has a knob or a stick which can detect the horizontal force applied by the user. The motion of the second wheel will be mapped to the buttons N3, for the negative direction, and N4, for the positive direction. If the buttons N3 and N4 actually exist in this mouse, their actions won't be detected by the X server. NOTE #1: horizontal movement may not always be detected by the current version of the X11R7.5 X servers, because there appears to be no accepted standard as to how the horizontal direction is encoded in mouse data. NOTE #2: Some mice think left is the negative horizontal direction, others may think otherwise. Moreover, there are some mice whose two wheels are both mounted vertically, and the direction of the second vertical wheel does not match the first one's. You need to edit the xorg.conf file by hand to change this option if the default value of "4 5 6 7" does not match the needs of your configuration. 5.3. Resolution The following option will set the mouse device resolution to N counts per inch, if possible: Option "Resolution" "N" Not all mice and OSs can support this option. 5.4. Drag Lock Buttons Some people find it difficult or inconvenient to hold a trackball button down, while at the same time moving the ball. Drag lock buttons simulate the holding down of another button. When a drag lock button is first pressed, its target buttons is "locked" down until the second time the lock button is released, or until the button itself is pressed and released. This allows the starting of a drag, the movement of the trackball, and the ending of the drag to be separate operations. Option "DragLockButtons" "W X Y Z" This option consists of pairs of buttons. Each lock button number is followed by the number of the button that it locks. In the above, button number "W" is a drag lock button for button "X" and button number "Y" is a drag lock button for button "Z". It may not be desirable to use multiple buttons as drag locks. Instead, a "master drag lock button" may be defined. A master drag lock button acts as a "META" key. After a master lock button is released, the next button pressed is "locked" and not released until the second time the real button is released. Option "DragLockButtons" "M" Since button "M" is unpaired it is a master drag lock button. 6. Mouse Gallery In all of the examples below, it is assumed that /dev/mouse is a link to the appropriate serial port or PS/2 mouse device. 6.1. MS IntelliMouse (serial, PS/2) This mouse has a wheel which also acts as the button 2 (middle button). The wheel movement is recognized as the Z axis motion. This behavior is not compatible with XFree86 versions prior to 3.3.2, but is more consistent with the support for other mice with wheels or rollers. If you want to make the wheel behave like before, you can use the "ZAxisMapping" option as described above. IntelliMouse supports the PnP COM device specification. To use this mouse as a serial device: Option "Protocol" "Auto" or: Option "Protocol" "IntelliMouse" To use this mouse as the PS/2 device and the OS supports PS/2 mouse initialization: Option "Protocol" "IMPS/2" To use this mouse as the PS/2 device but the OS does not support PS/2 mouse initialization (the wheel won't work in this case): Option "Protocol" "PS/2" To use this mouse as the PS/2 device and the OS supports automatic PS/2 mouse detection: Option "Protocol" "Auto" 6.2. MS IntelliMouse Explorer (PS/2, USB) This mouse has a wheel which also acts as the button 2 (middle button). There are two side buttons; they are recognized as the buttons 4 and 5. The wheel movement is recognized as the Z axis motion. To use this mouse as the PS/2 device and the OS supports PS/2 mouse initialization: Option "Protocol" "ExplorerPS/2" To use this mouse as the PS/2 device but the OS does not support PS/2 mouse initialization (the wheel and the side buttons won't work in this case): Option "Protocol" "PS/2" To use this mouse as the PS/2 device and the OS supports automatic PS/2 mouse detection: Option "Protocol" "Auto" To use this mouse as the USB device and the OS supports the generic HID protocol: Option "Protocol" "usb" To use this mouse as the USB device and the OS supports automatic mouse detection: Option "Protocol" "Auto" 6.3. Kensington Thinking Mouse and Kensington Expert Mouse (serial, PS/2) These mice have four buttons. The Kensington Expert Mouse is really a trackball. Both Thinking mice support the PnP COM device specification. To use this mouse as a serial device: Option "Protocol" "Auto" or: Option "Protocol" "ThinkingMouse" To use this mouse as the PS/2 device and the OS supports PS/2 mouse initialization: Option "Protocol" "ThinkingMousePS/2" To use this mouse as the PS/2 device but the OS does not support PS/2 mouse initialization (the third and the fourth buttons act as though they were the first and the second buttons): Option "Protocol" "PS/2" To use this mouse as the PS/2 device and the OS supports automatic PS/2 mouse detection: Option "Protocol" "Auto" 6.4. Genius NetScroll (PS/2) This mouse has four buttons and a roller. The roller movement is recognized as the Z axis motion. To use this mouse as the PS/2 device and the OS supports PS/2 mouse initialization: Option "Protocol" "NetScrollPS/2" To use this mouse as the PS/2 device but the OS does not support PS/2 mouse initialization (the roller and the fourth button won't work): Option "Protocol" "PS/2" To use this mouse as the PS/2 device and the OS supports automatic PS/2 mouse detection: Option "Protocol" "Auto" 6.5. Genius NetMouse and NetMouse Pro (serial, PS/2) These mice have a "magic button" which is used like a wheel or a roller. The "magic button" action is recognized as the Z axis motion. NetMouse Pro is identical to NetMouse except that it has the third button on the left hand side. NetMouse and NetMouse Pro support the PnP COM device specification. When used as a serial mouse, they are compatible with MS IntelliMouse. To use these mice as a serial device: Option "Protocol" "Auto" or: Option "Protocol" "IntelliMouse" To use this mouse as the PS/2 device and the OS supports PS/2 mouse initialization: Option "Protocol" "NetMousePS/2" To use this mouse as the PS/2 device but the OS does not support PS/2 mouse initialization (the "magic button" and the third button won't work): Option "Protocol" "PS/2" To use this mouse as the PS/2 device and the OS supports automatic PS/2 mouse detection: Option "Protocol" "Auto" 6.6. Genius NetScroll Optical (PS/2, USB) This mouse has a wheel which also acts as the button 2 (middle button), and two side buttons which are recognized as the buttons 4 and 5. It is compatible with NetMouse and NetMouse Pro. To use this mouse as the PS/2 device and the OS supports PS/2 mouse initialization: Option "Protocol" "NetMousePS/2" To use this mouse as the PS/2 device but the OS does not support PS/2 mouse initialization (the wheel and the side buttons won't work): Option "Protocol" "PS/2" To use this mouse as the PS/2 device and the OS supports automatic PS/2 mouse detection: Option "Protocol" "Auto" To use this mouse as the USB device and the OS supports the generic HID protocol: Option "Protocol" "usb" To use this mouse as the USB device and the OS supports automatic mouse detection: Option "Protocol" "Auto" 6.7. ALPS GlidePoint (serial, PS/2) The serial version of this pad device has been supported since XFree86 3.2. `Tapping' action is interpreted as the fourth button press. (IMHO, the fourth button of GlidePoint should always be mapped to the first button in order to make this pad behave like the other pad products.) To use this pad as a serial device: Option "Protocol" "GlidePoint" To use this mouse as the PS/2 device and the OS supports PS/2 mouse initialization: Option "Protocol" "GlidePointPS/2" To use this mouse as the PS/2 device but the OS does not support PS/2 mouse initialization: Option "Protocol" "PS/2" To use this mouse as the PS/2 device and the OS supports automatic PS/2 mouse detection: Option "Protocol" "Auto" 6.8. ASCII MieMouse (serial, PS/2) This mouse appears to be OEM from Genius. Although its shape is quite different, it works like Genius NetMouse Pro. This mouse has a "knob" which is used like a wheel or a roller. The "knob" action is recognized as the Z axis motion. MieMouse supports the PnP COM device specification. When used as a serial mouse, it is compatible with MS IntelliMouse. To use this mouse as a serial device: Option "Protocol" "Auto" or: Option "Protocol" "IntelliMouse" To use this mouse as the PS/2 device and the OS supports PS/2 mouse initialization: Option "Protocol" "NetMousePS/2" To use this mouse as the PS/2 device but the OS does not support PS/2 mouse initialization (the knob and the third button won't work): Option "Protocol" "PS/2" To use this mouse as the PS/2 device and the OS supports automatic PS/2 mouse detection: Option "Protocol" "Auto" 6.9. Logitech MouseMan+ and FirstMouse+ (serial, PS/2) MouseMan+ has two buttons on top, one side button and a roller. FirstMouse+ has two buttons and a roller. The roller movement is recognized as the Z axis motion. The roller also acts as the third button. The side button is recognized as the fourth button. MouseMan+ and FirstMouse+ support the PnP COM device specification. They have MS IntelliMouse compatible mode when used as a serial mouse. To use these mice as a serial device: Option "Protocol" "Auto" or: Option "Protocol" "IntelliMouse" To use this mouse as the PS/2 device and the OS supports PS/2 mouse initialization: Option "Protocol" "MouseManPlusPS/2" To use this mouse as the PS/2 device but the OS does not support PS/2 mouse initialization (the wheel and the fourth button won't work): Option "Protocol" "PS/2" To use this mouse as the PS/2 device and the OS supports automatic PS/2 mouse detection: Option "Protocol" "Auto" 6.10. IBM ScrollPoint (PS/2) ScrollPoint has a "stick" in between the two buttons. This "stick" is the same as the stick-shaped pointing device often found on notebook computers, on which you move the mouse cursor by pushing the stick. The stick movement is recognized as the Z axis motion. You can push the stick to right and left, as well as forward and backward. Give four numbers to ZAxisMapping option to map movement along all these four directions to button actions. This mouse is compatible with Logitech MouseMan+. To use this mouse as the PS/2 device and the OS supports PS/2 mouse initialization: Option "Protocol" "MouseManPlusPS/2" To use this mouse as the PS/2 device but the OS does not support PS/2 mouse initialization (the stick won't work): Option "Protocol" "PS/2" To use this mouse as the PS/2 device and the OS supports automatic PS/2 mouse detection: Option "Protocol" "Auto" 6.11. 8D ScrollMouse (serial, PS/2) ScrollMouse, also known as GyroMouse, has a "stick" similar to IBM ScrollPoint. The stick movement is recognized as the Z axis motion. You can push the stick to right and left, as well as forward and backward. Give four numbers to ZAxisMapping option to map movement along all these four directions to button actions. ScrollMouse supports the PnP COM device specification. When used as a serial mouse, it is compatible with MS IntelliMouse. To use this mouse as a serial device: Option "Protocol" "Auto" or: Option "Protocol" "IntelliMouse" To use this mouse as the PS/2 device and the OS supports PS/2 mouse initialization: Option "Protocol" "IMPS/2" To use this mouse as the PS/2 device but the OS does not support PS/2 mouse initialization (the stick won't work): Option "Protocol" "PS/2" To use this mouse as the PS/2 device and the OS supports automatic PS/2 mouse detection: Option "Protocol" "Auto" 6.12. A4 Tech 4D mice (serial, PS/2, USB) A4 Tech produces quit a number of mice with one or two wheels. Their mice may have 2, 3, or 4 buttons. The wheels movement is recognized as the Z axis motion. Give four numbers to ZAxisMapping option to map movement of both wheels to button actions. 4D mice support the PnP COM device specification. When used as a serial mouse, it is compatible with MS IntelliMouse. To use this mouse as a serial device: Option "Protocol" "Auto" or: Option "Protocol" "IntelliMouse" To use this mouse as the PS/2 device and the OS supports PS/2 mouse initialization: Option "Protocol" "IMPS/2" To use this mouse as the PS/2 device but the OS does not support PS/2 mouse initialization (the wheels won't work): Option "Protocol" "PS/2" To use this mouse as the PS/2 device and the OS supports automatic PS/2 mouse detection: Option "Protocol" "Auto" To use this mouse as the USB device and the OS supports the generic HID protocol: Option "Protocol" "usb" To use this mouse as the USB device and the OS supports automatic mouse detection: Option "Protocol" "Auto" 7. Configuration Examples This section shows some example InputDevice section for popular mice. All the examples assume that the mouse is connected to the PS/2 mouse port, and the OS supports the PS/2 mouse initialization. It is also assumed that /dev/mouse is a link to the PS/2 mouse port. Logitech MouseMan+ has 4 buttons and a wheel. The following example makes the wheel movement available as the button 5 and 6. Section "InputDevice" Identifier "MouseMan+" Driver "mouse" Option "Device" "/dev/mouse" Option "Protocol" "MouseManPlusPS/2" Option "Buttons" "6" Option "ZAxisMapping" "5 6" EndSection You can change button number assignment using the xmodmap command AFTER you start the X server with the above configuration. You may not like to use the wheel as the button 2 and rather want the side button (button 4) act like the button 2. You may also want to map the wheel movement to the button 4 and 5. This can be done by the following command: xmodmap -e "pointer = 1 6 3 2 4 5" After this command is run, the correspondence between the buttons and button numbers will be as shown in the following table. Physical Buttons Reported as: ------------------------------------ 1 Left Button Button 1 2 Wheel Button Button 6 3 Right Button Button 3 4 Side Button Button 2 5 Wheel Negative Move Button 4 6 Wheel Positive Move Button 5 Starting in the Xorg 6.9 release, you can also achieve this in your configuration file by adding this to the "InputDevice" section in xorg.conf: Option "ButtonMapping" "1 6 3 2 4 5" For the MS IntelliMouse Explorer which as a wheel and 5 buttons, you may have the following InputDevice section. Section "InputDevice" Identifier "IntelliMouse Explorer" Driver "mouse" Option "Device" "/dev/mouse" Option "Protocol" "ExplorerPS/2" Option "Buttons" "7" Option "ZAxisMapping" "6 7" EndSection The IntelliMouse Explorer has 5 buttons, thus, you should give "7" to the Buttons option if you want to map the wheel movement to buttons (6 and 7). With this configuration, the correspondence between the buttons and button numbers will be as follows: Physical Buttons Reported as: ------------------------------------ 1 Left Button Button 1 2 Wheel Button Button 2 3 Right Button Button 3 4 Side Button 1 Button 4 5 Side Button 2 Button 5 6 Wheel Negative Move Button 6 7 Wheel Positive Move Button 7 You can change button number assignment using xmodmap AFTER you started the X server with the above configuration. xmodmap -e "pointer = 1 2 3 4 7 5 6" The above command will moves the side button 2 to the button 7 and make the wheel movement reported as the button 5 and 6. See the table below. Physical Buttons Reported as: ------------------------------------ 1 Left Button Button 1 2 Wheel Button Button 2 3 Right Button Button 3 4 Side Button 1 Button 4 5 Side Button 2 Button 7 6 Wheel Negative Move Button 5 7 Wheel Positive Move Button 6 For the A4 Tech WinEasy mouse which has two wheels and 3 buttons, you may have the following InputDevice section. Section "InputDevice" Identifier "WinEasy" Driver "mouse" Option "Device" "/dev/mouse" Option "Protocol" "IMPS/2" Option "Buttons" "7" Option "ZAxisMapping" "4 5 6 7" EndSection The movement of the first wheel is mapped to the button 4 and 5. The second wheel's movement will be reported as the buttons 6 and 7. The Kensington Expert mouse is really a trackball. It has 4 buttons arranged in a rectangle around the ball. Section "InputDevice" Identifier "DLB" Driver "mouse" Option "Protocol" "ThinkingMousePS/2" Option "Buttons" "3" Option "Emulate3Buttons" Option "Device" "/dev/mouse" Option "DragLockButtons" "2 1 4 3" EndSection In this example, button 2 is a drag lock button for button number 1, and button 4 is a drag lock button for button 3. Since button 2 is above button 1 and button 4 is above button 3 in the layout of this trackball, this is reasonable. Because button 2 is being used as a drag lock, it can not be used as an ordinary button. However, it can be activated by using the "Emulate3Buttons" feature. However, some people my be unable to press two buttons at the same time. They may prefer the following InputDevice section which defines button 4 as a master drag lock button, and leaves button 2 free for ordinary use. Section "InputDevice" Identifier "MasterDLB" Driver "mouse" Option "Protocol" "ThinkingMousePS/2" Option "Buttons" "3" Option "Device" "/dev/mouse" Option "DragLockButtons" "4" EndSection xf86-input-mouse-1.9.0/install-sh0000755003204500007640000003325512124442147013542 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # 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 the # rights to use, copy, modify, merge, publish, distribute, sublicense, 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 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 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: xf86-input-mouse-1.9.0/config.h.in0000664003204500007640000000343412124442146013556 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Major version of this package */ #undef PACKAGE_VERSION_MAJOR /* Minor version of this package */ #undef PACKAGE_VERSION_MINOR /* Patch version of this package */ #undef PACKAGE_VERSION_PATCHLEVEL /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION xf86-input-mouse-1.9.0/src/0000775003204500007640000000000012124442510012371 500000000000000xf86-input-mouse-1.9.0/src/Makefile.in0000664003204500007640000005351612124442150014370 00000000000000# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # 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. VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)" LTLIBRARIES = $(@DRIVER_NAME@_drv_la_LTLIBRARIES) @DRIVER_NAME@_drv_la_LIBADD = am_@DRIVER_NAME@_drv_la_OBJECTS = mouse.lo pnp.lo \ @OS_MOUSE_NAME@_mouse.lo @DRIVER_NAME@_drv_la_OBJECTS = $(am_@DRIVER_NAME@_drv_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @DRIVER_NAME@_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(@DRIVER_NAME@_drv_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(@DRIVER_NAME@_drv_la_SOURCES) DIST_SOURCES = $(@DRIVER_NAME@_drv_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINT = @LINT@ LINT_FLAGS = @LINT_FLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_MOUSE_NAME = @OS_MOUSE_NAME@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ inputdir = @inputdir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = $(CWARNFLAGS) AM_CPPFLAGS = -I$(top_srcdir)/include $(XORG_CFLAGS) # this is obnoxious: # -module lets us name the module exactly how we want # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. @DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la @DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version @DRIVER_NAME@_drv_ladir = @inputdir@ # We have to list all the mouse drivers here, even if we don't build them, so # they get included in distcheck. OS_SRCS = bsd_mouse.c hurd_mouse.c lnx_mouse.c sun_mouse.c @DRIVER_NAME@_drv_la_SOURCES = \ mouse.c \ mouse.h \ pnp.c \ mousePriv.h \ compat-api.h \ @OS_MOUSE_NAME@_mouse.c EXTRA_DIST = $(OS_SRCS) @LINT_TRUE@ALL_LINT_FLAGS = $(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ @LINT_TRUE@ $(AM_CPPFLAGS) $(CPPFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-@DRIVER_NAME@_drv_laLTLIBRARIES: $(@DRIVER_NAME@_drv_la_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(@DRIVER_NAME@_drv_la_LTLIBRARIES)'; test -n "$(@DRIVER_NAME@_drv_ladir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)'"; \ $(MKDIR_P) "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)"; \ } uninstall-@DRIVER_NAME@_drv_laLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(@DRIVER_NAME@_drv_la_LTLIBRARIES)'; test -n "$(@DRIVER_NAME@_drv_ladir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)/$$f"; \ done clean-@DRIVER_NAME@_drv_laLTLIBRARIES: -test -z "$(@DRIVER_NAME@_drv_la_LTLIBRARIES)" || rm -f $(@DRIVER_NAME@_drv_la_LTLIBRARIES) @list='$(@DRIVER_NAME@_drv_la_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } @DRIVER_NAME@_drv.la: $(@DRIVER_NAME@_drv_la_OBJECTS) $(@DRIVER_NAME@_drv_la_DEPENDENCIES) $(EXTRA_@DRIVER_NAME@_drv_la_DEPENDENCIES) $(AM_V_CCLD)$(@DRIVER_NAME@_drv_la_LINK) -rpath $(@DRIVER_NAME@_drv_ladir) $(@DRIVER_NAME@_drv_la_OBJECTS) $(@DRIVER_NAME@_drv_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/@OS_MOUSE_NAME@_mouse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mouse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pnp.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(@DRIVER_NAME@_drv_ladir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-@DRIVER_NAME@_drv_laLTLIBRARIES clean-generic \ clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-@DRIVER_NAME@_drv_laLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-@DRIVER_NAME@_drv_laLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-@DRIVER_NAME@_drv_laLTLIBRARIES clean-generic \ clean-libtool cscopelist ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install \ install-@DRIVER_NAME@_drv_laLTLIBRARIES install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-@DRIVER_NAME@_drv_laLTLIBRARIES \ uninstall-am @LINT_TRUE@lint: @LINT_TRUE@ $(LINT) $(ALL_LINT_FLAGS) $(@DRIVER_NAME@_drv_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xf86-input-mouse-1.9.0/src/bsd_mouse.c0000664003204500007640000005574712034427367014474 00000000000000 /* * Copyright (c) 1999-2003 by The XFree86 Project, Inc. * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 holder(s) * and author(s) 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 holder(s) and author(s). */ #include #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86Xinput.h" #include "mouse.h" #include "xisb.h" #include "mipointer.h" #ifdef WSCONS_SUPPORT #include #endif #ifdef USBMOUSE_SUPPORT #ifdef HAS_LIB_USB_HID #include #else #include "usb.h" #endif #include #ifdef USB_GET_REPORT_ID #define USB_NEW_HID #endif #define HUP_GENERIC_DESKTOP 0x0001 #define HUP_BUTTON 0x0009 #define HUG_X 0x0030 #define HUG_Y 0x0031 #define HUG_Z 0x0032 #define HUG_WHEEL 0x0038 #define HID_USAGE2(p,u) (((p) << 16) | u) /* The UMS mices have middle button as number 3 */ #define UMS_BUT(i) ((i) == 0 ? 2 : (i) == 1 ? 0 : (i) == 2 ? 1 : (i)) #endif /* USBMOUSE_SUPPORT */ #ifdef USBMOUSE_SUPPORT static void usbSigioReadInput (int fd, void *closure); #endif static const char *FindDevice(InputInfoPtr, const char *, int); #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) /* These are for FreeBSD and DragonFly */ #define DEFAULT_MOUSE_DEV "/dev/mouse" #define DEFAULT_SYSMOUSE_DEV "/dev/sysmouse" #define DEFAULT_PS2_DEV "/dev/psm0" static const char *mouseDevs[] = { DEFAULT_MOUSE_DEV, DEFAULT_SYSMOUSE_DEV, DEFAULT_PS2_DEV, NULL }; #elif (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT) /* Only wsmouse mices are autoconfigured for now on OpenBSD */ #define DEFAULT_WSMOUSE_DEV "/dev/wsmouse" #define DEFAULT_WSMOUSE0_DEV "/dev/wsmouse0" static const char *mouseDevs[] = { DEFAULT_WSMOUSE_DEV, DEFAULT_WSMOUSE0_DEV, NULL }; #endif static int SupportedInterfaces(void) { #if defined(__NetBSD__) return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO; #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO | MSE_MISC; #else return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO | MSE_MISC; #endif } /* Names of protocols that are handled internally here. */ static const char *internalNames[] = { #if defined(WSCONS_SUPPORT) "WSMouse", #endif #if defined(USBMOUSE_SUPPORT) "usb", #endif NULL }; /* * Names of MSC_MISC protocols that the OS supports. These are decoded by * main "mouse" driver. */ static const char *miscNames[] = { #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) "SysMouse", #endif NULL }; static const char ** BuiltinNames(void) { return internalNames; } static Bool CheckProtocol(const char *protocol) { int i; for (i = 0; internalNames[i]; i++) if (xf86NameCmp(protocol, internalNames[i]) == 0) return TRUE; for (i = 0; miscNames[i]; i++) if (xf86NameCmp(protocol, miscNames[i]) == 0) return TRUE; return FALSE; } static const char * DefaultProtocol(void) { #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) return "Auto"; #elif (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT) return "WSMouse"; #else return NULL; #endif } #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)) && defined(MOUSE_PROTO_SYSMOUSE) static struct { int dproto; const char *name; } devproto[] = { { MOUSE_PROTO_MS, "Microsoft" }, { MOUSE_PROTO_MSC, "MouseSystems" }, { MOUSE_PROTO_LOGI, "Logitech" }, { MOUSE_PROTO_MM, "MMSeries" }, { MOUSE_PROTO_LOGIMOUSEMAN, "MouseMan" }, { MOUSE_PROTO_BUS, "BusMouse" }, { MOUSE_PROTO_INPORT, "BusMouse" }, { MOUSE_PROTO_PS2, "PS/2" }, { MOUSE_PROTO_HITTAB, "MMHitTab" }, { MOUSE_PROTO_GLIDEPOINT, "GlidePoint" }, { MOUSE_PROTO_INTELLI, "Intellimouse" }, { MOUSE_PROTO_THINK, "ThinkingMouse" }, { MOUSE_PROTO_SYSMOUSE, "SysMouse" } }; static const char * SetupAuto(InputInfoPtr pInfo, int *protoPara) { int i; mousehw_t hw; mousemode_t mode; if (pInfo->fd == -1) return NULL; /* set the driver operation level, if applicable */ i = 1; ioctl(pInfo->fd, MOUSE_SETLEVEL, &i); /* interrogate the driver and get some intelligence on the device. */ hw.iftype = MOUSE_IF_UNKNOWN; hw.model = MOUSE_MODEL_GENERIC; ioctl(pInfo->fd, MOUSE_GETHWINFO, &hw); xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: hw.iftype is %d, hw.model is %d\n", pInfo->name, hw.iftype, hw.model); if (ioctl(pInfo->fd, MOUSE_GETMODE, &mode) == 0) { for (i = 0; i < sizeof(devproto)/sizeof(devproto[0]); ++i) { if (mode.protocol == devproto[i].dproto) { /* override some parameters */ if (protoPara) { protoPara[4] = mode.packetsize; protoPara[0] = mode.syncmask[0]; protoPara[1] = mode.syncmask[1]; } xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n", pInfo->name, devproto[i].name); return devproto[i].name; } } } return NULL; } static void SetSysMouseRes(InputInfoPtr pInfo, const char *protocol, int rate, int res) { mousemode_t mode; MouseDevPtr pMse; pMse = pInfo->private; mode.rate = rate > 0 ? rate : -1; mode.resolution = res > 0 ? res : -1; mode.accelfactor = -1; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) if (pMse->autoProbe || (protocol && xf86NameCmp(protocol, "SysMouse") == 0)) { /* * As the FreeBSD sysmouse driver defaults to protocol level 0 * everytime it is opened we enforce protocol level 1 again at * this point. */ mode.level = 1; } else mode.level = -1; #else mode.level = -1; #endif ioctl(pInfo->fd, MOUSE_SETMODE, &mode); } #endif #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) #define MOUSED_PID_FILE "/var/run/moused.pid" /* * Try to check if moused is running. DEFAULT_SYSMOUSE_DEV is useless without * it. There doesn't seem to be a better way of checking. */ static Bool MousedRunning(void) { FILE *f = NULL; unsigned int pid; if ((f = fopen(MOUSED_PID_FILE, "r")) != NULL) { if (fscanf(f, "%u", &pid) == 1 && pid > 0) { if (kill(pid, 0) == 0) { fclose(f); return TRUE; } } fclose(f); } return FALSE; } static const char * FindDevice(InputInfoPtr pInfo, const char *protocol, int flags) { int fd = -1; const char **pdev, *dev = NULL; Bool devMouse = FALSE; struct stat devMouseStat; struct stat sb; for (pdev = mouseDevs; *pdev; pdev++) { SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK)); if (fd == -1) { #ifdef DEBUG ErrorF("Cannot open %s (%s)\n", *pdev, strerror(errno)); #endif } else { /* * /dev/mouse is held until checks for matches with other devices * are done. This is so that when it points to /dev/sysmouse, * the test for whether /dev/sysmouse is usable can be made. */ if (!strcmp(*pdev, DEFAULT_MOUSE_DEV)) { if (fstat(fd, &devMouseStat) == 0) devMouse = TRUE; close(fd); continue; } else if (!strcmp(*pdev, DEFAULT_SYSMOUSE_DEV)) { /* Check if /dev/mouse is the same as /dev/sysmouse. */ if (devMouse && fstat(fd, &sb) == 0 && devMouseStat.st_dev == sb.st_dev && devMouseStat.st_ino == sb.st_ino) { /* If the same, use /dev/sysmouse. */ devMouse = FALSE; } close(fd); if (MousedRunning()) break; else { #ifdef DEBUG ErrorF("moused isn't running\n"); #endif } } else { close(fd); break; } } } if (*pdev) dev = *pdev; else if (devMouse) dev = DEFAULT_MOUSE_DEV; if (dev) { /* Set the Device option. */ pInfo->options = xf86AddNewOption(pInfo->options, "Device", dev); xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n", pInfo->name, dev); } return *pdev; } #endif #if (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT) /* Only support wsmouse configuration for now */ static const char * SetupAuto(InputInfoPtr pInfo, int *protoPara) { xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n", pInfo->name, "wsmouse"); return "wsmouse"; } static void SetMouseRes(InputInfoPtr pInfo, const char *protocol, int rate, int res) { xf86MsgVerb(X_INFO, 3, "%s: SetMouseRes: protocol %s rate %d res %d\n", pInfo->name, protocol, rate, res); } static const char * FindDevice(InputInfoPtr pInfo, const char *protocol, int flags) { int fd = -1; const char **pdev; for (pdev = mouseDevs; *pdev; pdev++) { SYSCALL(fd = open(*pdev, O_RDWR | O_NONBLOCK)); if (fd != -1) { /* Set the Device option. */ pInfo->options = xf86AddNewOption(pInfo->options, "Device", *pdev); xf86Msg(X_INFO, "%s: found Device \"%s\"\n", pInfo->name, *pdev); close(fd); break; } } return *pdev; } #endif /* __OpenBSD__ || __NetBSD__ && WSCONS_SUPPORT */ #ifdef WSCONS_SUPPORT #define NUMEVENTS 64 static void wsconsReadInput(InputInfoPtr pInfo) { MouseDevPtr pMse; static struct wscons_event eventList[NUMEVENTS]; int n, c; struct wscons_event *event = eventList; unsigned char *pBuf; pMse = pInfo->private; XisbBlockDuration(pMse->buffer, -1); pBuf = (unsigned char *)eventList; n = 0; while (n < sizeof(eventList) && (c = XisbRead(pMse->buffer)) >= 0) { pBuf[n++] = (unsigned char)c; } if (n == 0) return; n /= sizeof(struct wscons_event); while( n-- ) { int buttons = pMse->lastButtons; int dx = 0, dy = 0, dz = 0, dw = 0; switch (event->type) { case WSCONS_EVENT_MOUSE_UP: #define BUTBIT (1 << (event->value <= 2 ? 2 - event->value : event->value)) buttons &= ~BUTBIT; break; case WSCONS_EVENT_MOUSE_DOWN: buttons |= BUTBIT; break; case WSCONS_EVENT_MOUSE_DELTA_X: dx = event->value; break; case WSCONS_EVENT_MOUSE_DELTA_Y: dy = -event->value; break; #ifdef WSCONS_EVENT_MOUSE_DELTA_Z case WSCONS_EVENT_MOUSE_DELTA_Z: dz = event->value; break; #endif #ifdef WSCONS_EVENT_MOUSE_DELTA_W case WSCONS_EVENT_MOUSE_DELTA_W: dw = event->value; break; #endif default: LogMessageVerbSigSafe(X_WARNING, -1, "%s: bad wsmouse event type=%d\n", pInfo->name, event->type); ++event; continue; } pMse->PostEvent(pInfo, buttons, dx, dy, dz, dw); ++event; } return; } /* This function is called when the protocol is "wsmouse". */ static Bool wsconsPreInit(InputInfoPtr pInfo, const char *protocol, int flags) { MouseDevPtr pMse = pInfo->private; /* Setup the local input proc. */ pInfo->read_input = wsconsReadInput; pMse->xisbscale = sizeof(struct wscons_event); #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 pInfo->flags |= XI86_CONFIGURED; #endif return TRUE; } #endif #if defined(USBMOUSE_SUPPORT) typedef struct _UsbMseRec { int packetSize; int iid; hid_item_t loc_x; /* x locator item */ hid_item_t loc_y; /* y locator item */ hid_item_t loc_z; /* z (wheel) locator item */ hid_item_t loc_w; /* z (wheel) locator item */ hid_item_t loc_btn[MSE_MAXBUTTONS]; /* buttons locator items */ unsigned char *buffer; } UsbMseRec, *UsbMsePtr; static int usbMouseProc(DeviceIntPtr pPointer, int what) { InputInfoPtr pInfo; MouseDevPtr pMse; UsbMsePtr pUsbMse; unsigned char map[MSE_MAXBUTTONS + 1]; int nbuttons; pInfo = pPointer->public.devicePrivate; pMse = pInfo->private; pMse->device = pPointer; pUsbMse = pMse->mousePriv; switch (what) { case DEVICE_INIT: pPointer->public.on = FALSE; for (nbuttons = 0; nbuttons < MSE_MAXBUTTONS; ++nbuttons) map[nbuttons + 1] = nbuttons + 1; InitPointerDeviceStruct((DevicePtr)pPointer, map, min(pMse->buttons, MSE_MAXBUTTONS), miPointerGetMotionEvents, pMse->Ctrl, miPointerGetMotionBufferSize()); /* X valuator */ xf86InitValuatorAxisStruct(pPointer, 0, 0, -1, 1, 0, 1); xf86InitValuatorDefaults(pPointer, 0); /* Y valuator */ xf86InitValuatorAxisStruct(pPointer, 1, 0, -1, 1, 0, 1); xf86InitValuatorDefaults(pPointer, 1); xf86MotionHistoryAllocate(pInfo); break; case DEVICE_ON: pInfo->fd = xf86OpenSerial(pInfo->options); if (pInfo->fd == -1) xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name); else { pMse->buffer = XisbNew(pInfo->fd, pUsbMse->packetSize); if (!pMse->buffer) { free(pMse); xf86CloseSerial(pInfo->fd); pInfo->fd = -1; } else { xf86FlushInput(pInfo->fd); if (!xf86InstallSIGIOHandler (pInfo->fd, usbSigioReadInput, pInfo)) AddEnabledDevice(pInfo->fd); } } pMse->lastButtons = 0; pMse->lastMappedButtons = 0; pMse->emulateState = 0; pPointer->public.on = TRUE; break; case DEVICE_OFF: case DEVICE_CLOSE: if (pInfo->fd != -1) { RemoveEnabledDevice(pInfo->fd); if (pUsbMse->packetSize > 8 && pUsbMse->buffer) { free(pUsbMse->buffer); } if (pMse->buffer) { XisbFree(pMse->buffer); pMse->buffer = NULL; } xf86CloseSerial(pInfo->fd); pInfo->fd = -1; } pPointer->public.on = FALSE; usleep(300000); break; default: return BadValue; } return Success; } static void usbReadInput(InputInfoPtr pInfo) { MouseDevPtr pMse; UsbMsePtr pUsbMse; int buttons = pMse->lastButtons; int dx = 0, dy = 0, dz = 0, dw = 0; int n, c; unsigned char *pBuf; pMse = pInfo->private; pUsbMse = pMse->mousePriv; XisbBlockDuration(pMse->buffer, -1); pBuf = pUsbMse->buffer; n = 0; while ((c = XisbRead(pMse->buffer)) >= 0 && n < pUsbMse->packetSize) { pBuf[n++] = (unsigned char)c; } if (n == 0) return; if (n != pUsbMse->packetSize) { LogMessageVerbSigSafe(X_WARNING, -1, "%s: incomplete packet, size %d\n", pInfo->name, n); } /* discard packets with an id that don't match the mouse */ /* XXX this is probably not the right thing */ if (pUsbMse->iid != 0) { if (*pBuf++ != pUsbMse->iid) return; } dx = hid_get_data(pBuf, &pUsbMse->loc_x); dy = hid_get_data(pBuf, &pUsbMse->loc_y); dz = hid_get_data(pBuf, &pUsbMse->loc_z); dw = hid_get_data(pBuf, &pUsbMse->loc_w); buttons = 0; for (n = 0; n < pMse->buttons; n++) { if (hid_get_data(pBuf, &pUsbMse->loc_btn[n])) buttons |= (1 << UMS_BUT(n)); } pMse->PostEvent(pInfo, buttons, dx, dy, dz, dw); return; } static void usbSigioReadInput (int fd, void *closure) { usbReadInput ((InputInfoPtr) closure); } /* This function is called when the protocol is "usb". */ static Bool usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags) { MouseDevPtr pMse = pInfo->private; UsbMsePtr pUsbMse; report_desc_t reportDesc; int i; pUsbMse = malloc(sizeof(UsbMseRec)); if (pUsbMse == NULL) { xf86Msg(X_ERROR, "%s: cannot allocate UsbMouseRec\n", pInfo->name); free(pMse); return FALSE; } pMse->protocol = protocol; xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol); /* Collect the options, and process the common options. */ COLLECT_INPUT_OPTIONS(pInfo, NULL); xf86ProcessCommonOptions(pInfo, pInfo->options); /* Check if the device can be opened. */ pInfo->fd = xf86OpenSerial(pInfo->options); if (pInfo->fd == -1) { if (xf86GetAllowMouseOpenFail()) xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name); else { xf86Msg(X_ERROR, "%s: cannot open input device\n", pInfo->name); free(pUsbMse); free(pMse); return FALSE; } } /* Get USB informations */ reportDesc = hid_get_report_desc(pInfo->fd); /* Get packet size & iid */ #ifdef USB_NEW_HID if (ioctl(pInfo->fd, USB_GET_REPORT_ID, &pUsbMse->iid) == -1) { xf86Msg(X_ERROR, "Error ioctl USB_GET_REPORT_ID on %s : %s\n", pInfo->name, strerror(errno)); return FALSE; } pUsbMse->packetSize = hid_report_size(reportDesc, hid_input, pUsbMse->iid); #else pUsbMse->packetSize = hid_report_size(reportDesc, hid_input, &pUsbMse->iid); #endif /* Allocate buffer */ if (pUsbMse->packetSize <= 8) { pUsbMse->buffer = pMse->protoBuf; } else { pUsbMse->buffer = malloc(pUsbMse->packetSize); } if (pUsbMse->buffer == NULL) { xf86Msg(X_ERROR, "%s: cannot allocate buffer\n", pInfo->name); free(pUsbMse); free(pMse); xf86CloseSerial(pInfo->fd); return FALSE; } #ifdef USB_NEW_HID if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), hid_input, &pUsbMse->loc_x, pUsbMse->iid) < 0) { xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name); } if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y), hid_input, &pUsbMse->loc_y, pUsbMse->iid) < 0) { xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name); } if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), hid_input, &pUsbMse->loc_z, pUsbMse->iid) < 0) { } #else if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), hid_input, &pUsbMse->loc_x) < 0) { xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name); } if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y), hid_input, &pUsbMse->loc_y) < 0) { xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name); } if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), hid_input, &pUsbMse->loc_z) < 0) { } #endif /* Probe for number of buttons */ for (i = 1; i <= MSE_MAXBUTTONS; i++) { if (!hid_locate(reportDesc, HID_USAGE2(HUP_BUTTON, i), hid_input, &pUsbMse->loc_btn[i-1] #ifdef USB_NEW_HID , pUsbMse->iid #endif )) break; } pMse->buttons = i-1; xf86CloseSerial(pInfo->fd); pInfo->fd = -1; /* Private structure */ pMse->mousePriv = pUsbMse; /* Process common mouse options (like Emulate3Buttons, etc). */ pMse->CommonOptions(pInfo); /* Setup the local procs. */ pInfo->device_control = usbMouseProc; pInfo->read_input = usbReadInput; #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 pInfo->flags |= XI86_CONFIGURED; #endif return TRUE; } #endif /* USBMOUSE */ static Bool bsdMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags) { /* The protocol is guaranteed to be one of the internalNames[] */ #ifdef WSCONS_SUPPORT if (xf86NameCmp(protocol, "WSMouse") == 0) { return wsconsPreInit(pInfo, protocol, flags); } #endif #ifdef USBMOUSE_SUPPORT if (xf86NameCmp(protocol, "usb") == 0) { return usbPreInit(pInfo, protocol, flags); } #endif return TRUE; } OSMouseInfoPtr OSMouseInit(int flags) { OSMouseInfoPtr p; p = calloc(sizeof(OSMouseInfoRec), 1); if (!p) return NULL; p->SupportedInterfaces = SupportedInterfaces; p->BuiltinNames = BuiltinNames; p->DefaultProtocol = DefaultProtocol; p->CheckProtocol = CheckProtocol; #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)) && defined(MOUSE_PROTO_SYSMOUSE) p->SetupAuto = SetupAuto; p->SetPS2Res = SetSysMouseRes; p->SetBMRes = SetSysMouseRes; p->SetMiscRes = SetSysMouseRes; #endif #if (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT) p->SetupAuto = SetupAuto; p->SetMiscRes = SetMouseRes; #endif #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__NetBSD__) p->FindDevice = FindDevice; #endif p->PreInit = bsdMousePreInit; return p; } xf86-input-mouse-1.9.0/src/lnx_mouse.c0000664003204500007640000001305111760540151014473 00000000000000 /* * Copyright 1999 by The XFree86 Project, Inc. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "xf86.h" #include "xf86Xinput.h" #include "mouse.h" #include "xf86_OSlib.h" #include #include #include static int SupportedInterfaces(void) { return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO; } static const char * DefaultProtocol(void) { return "Auto"; } #define DEFAULT_MOUSE_DEV "/dev/input/mice" #define DEFAULT_PS2_DEV "/dev/psaux" #define DEFAULT_GPM_DATA_DEV "/dev/gpmdata" #define DEFAULT_GPM_CTL_DEV "/dev/gpmdata" static const char *mouseDevs[] = { DEFAULT_MOUSE_DEV, DEFAULT_PS2_DEV, DEFAULT_GPM_DATA_DEV, NULL }; typedef enum { MOUSE_PROTO_UNKNOWN = 0, MOUSE_PROTO_SERIAL, MOUSE_PROTO_PS2, MOUSE_PROTO_MSC, MOUSE_PROTO_GPM, MOUSE_PROTO_EXPPS2, } protocolTypes; static struct { protocolTypes proto; const char *name; } devproto[] = { { MOUSE_PROTO_UNKNOWN, NULL }, { MOUSE_PROTO_PS2, "PS/2" }, { MOUSE_PROTO_MSC, "MouseSystems" }, { MOUSE_PROTO_GPM, "GPM" }, { MOUSE_PROTO_EXPPS2, "ExplorerPS/2" }, }; static const char * FindDevice(InputInfoPtr pInfo, const char *protocol, int flags) { int fd = -1; const char **pdev; for (pdev = mouseDevs; *pdev; pdev++) { SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK | O_EXCL)); if (fd == -1) { #ifdef DEBUG ErrorF("Cannot open %s (%s)\n", *pdev, strerror(errno)); #endif } else break; } if (*pdev) { close(fd); /* Set the Device option. */ pInfo->options = xf86AddNewOption(pInfo->options, "Device", *pdev); xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n", pInfo->name, *pdev); } return *pdev; } static const char * lnxMouseMagic(InputInfoPtr pInfo) { int fd = -1; const char *dev; char *realdev; struct stat sbuf; int i; int proto = MOUSE_PROTO_UNKNOWN; dev = xf86SetStrOption(pInfo->options, "Device", NULL); if (!dev) { #ifdef DEBUG ErrorF("xf86SetStrOption failed to return the device name\n"); #endif return NULL; } /* Look at the device name to guess the protocol. */ realdev = NULL; if (strcmp(dev, DEFAULT_MOUSE_DEV) == 0) { if (lstat(dev, &sbuf) != 0) { #ifdef DEBUG ErrorF("lstat failed for %s (%s)\n", dev, strerror(errno)); #endif return NULL; } if (S_ISLNK(sbuf.st_mode)) { realdev = xnfalloc(PATH_MAX + 1); i = readlink(dev, realdev, PATH_MAX); if (i <= 0) { #ifdef DEBUG ErrorF("readlink failed for %s (%s)\n", dev, strerror(errno)); #endif free(realdev); return NULL; } realdev[i] = '\0'; } } if (!realdev) realdev = xnfstrdup(dev); else { /* If realdev doesn't contain a '/' then prepend "/dev/" */ if (!strchr(realdev, '/')) { char *tmp = xnfalloc(strlen(realdev) + 5 + 1); sprintf(tmp, "/dev/%s", realdev); free(realdev); realdev = tmp; } } if (strcmp(realdev, DEFAULT_MOUSE_DEV) == 0) proto = MOUSE_PROTO_EXPPS2; else if (strcmp(realdev, DEFAULT_PS2_DEV) == 0) proto = MOUSE_PROTO_EXPPS2; else if (strcmp(realdev, DEFAULT_GPM_DATA_DEV) == 0) proto = MOUSE_PROTO_MSC; else if (strcmp(realdev, DEFAULT_GPM_CTL_DEV) == 0) proto = MOUSE_PROTO_GPM; free(realdev); /* * If the protocol can't be guessed from the device name, * try to characterise it. */ if (proto == MOUSE_PROTO_UNKNOWN) { SYSCALL (fd = open(dev, O_RDWR | O_NONBLOCK | O_EXCL)); if (isatty(fd)) { /* Serial PnP has already failed, so give up. */ } else { if (fstat(fd, &sbuf) != 0) { #ifdef DEBUG ErrorF("fstat failed for %s (%s)\n", dev, strerror(errno)); #endif close(fd); return NULL; } if (S_ISFIFO(sbuf.st_mode)) { /* Assume GPM data in MSC format. */ proto = MOUSE_PROTO_MSC; } else { /* Default to PS/2 */ proto = MOUSE_PROTO_PS2; } } close(fd); } if (proto == MOUSE_PROTO_UNKNOWN) { xf86Msg(X_ERROR, "%s: Cannot find mouse protocol.\n", pInfo->name); return NULL; } else { for (i = 0; i < sizeof(devproto)/sizeof(devproto[0]); i++) { if (devproto[i].proto == proto) { xf86Msg(X_INFO, "%s: Setting mouse protocol to \"%s\"\n", pInfo->name, devproto[i].name); return devproto[i].name; } } } return NULL; } static const char * GuessProtocol(InputInfoPtr pInfo, int flags) { return lnxMouseMagic(pInfo); } static const char * SetupAuto(InputInfoPtr pInfo, int *protoPara) { return lnxMouseMagic(pInfo); } OSMouseInfoPtr OSMouseInit(int flags) { OSMouseInfoPtr p; p = calloc(sizeof(OSMouseInfoRec), 1); if (!p) return NULL; p->SupportedInterfaces = SupportedInterfaces; p->DefaultProtocol = DefaultProtocol; p->FindDevice = FindDevice; p->GuessProtocol = GuessProtocol; p->SetupAuto = SetupAuto; return p; } xf86-input-mouse-1.9.0/src/compat-api.h0000664003204500007640000000675212004412630014523 00000000000000/* * Copyright 2012 Red Hat, Inc. * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Dave Airlie */ /* this file provides API compat between server post 1.13 and pre it, it should be reused inside as many drivers as possible */ #ifndef COMPAT_API_H #define COMPAT_API_H #ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR #define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] #define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p #endif #ifndef XF86_HAS_SCRN_CONV #define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] #define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] #endif #ifndef XF86_SCRN_INTERFACE #define SCRN_ARG_TYPE int #define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] #define SCREEN_ARG_TYPE int #define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] #define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv #define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask #define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask #define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen #define CLOSE_SCREEN_ARGS scrnIndex, pScreen #define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags #define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0 #define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags #define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0 #define FREE_SCREEN_ARGS_DECL int arg, int flags #define VT_FUNC_ARGS_DECL int arg, int flags #define VT_FUNC_ARGS pScrn->scrnIndex, 0 #define SCRN_OR_INDEX_ARG(x) ((x)->scrnIndex) #else #define SCRN_ARG_TYPE ScrnInfoPtr #define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) #define SCREEN_ARG_TYPE ScreenPtr #define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) #define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask #define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen #define CLOSE_SCREEN_ARGS pScreen #define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y #define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y #define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode #define SWITCH_MODE_ARGS(arg, m) arg, m #define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg #define VT_FUNC_ARGS_DECL ScrnInfoPtr arg #define VT_FUNC_ARGS pScrn #define SCRN_OR_INDEX_ARG(x) (x) #endif #endif xf86-input-mouse-1.9.0/src/mousePriv.h0000664003204500007640000000400211760540151014454 00000000000000/* * Copyright (c) 1997-1999 by The XFree86 Project, Inc. */ #ifndef _X_MOUSEPRIV_H #define _X_MOUSEPRIV_H #if 0 # define MOUSEINITDEBUG # define MOUSEDATADEBUG #endif #include "mouse.h" #include "xf86Xinput.h" /* Private interface for the mouse driver. */ typedef enum { AUTOPROBE_H_NOPROTO, AUTOPROBE_H_GOOD, AUTOPROBE_H_AUTODETECT, AUTOPROBE_H_VALIDATE1, AUTOPROBE_H_VALIDATE2, AUTOPROBE_H_SETPROTO, AUTOPROBE_NOPROTO, AUTOPROBE_COLLECT, AUTOPROBE_CREATE_PROTOLIST, AUTOPROBE_GOOD, AUTOPROBE_AUTODETECT, AUTOPROBE_VALIDATE1, AUTOPROBE_VALIDATE2, AUTOPROBE_SWITCHSERIAL, AUTOPROBE_SWITCH_PROTOCOL } mseAutoProbeStates; typedef struct { const char * name; int class; const char ** defaults; MouseProtocolID id; } MouseProtocolRec, *MouseProtocolPtr; #define NUM_MSE_AUTOPROBE_BYTES 24 /* multiple of 3,4 and 6 byte packages */ #define NUM_MSE_AUTOPROBE_TOTAL 64 #define NUM_AUTOPROBE_PROTOS 17 typedef struct { int current; Bool inReset; CARD32 lastEvent; CARD32 expires; Bool soft; int goodCount; int badCount; int protocolID; int count; char data[NUM_MSE_AUTOPROBE_TOTAL]; mseAutoProbeStates autoState; MouseProtocolID protoList[NUM_AUTOPROBE_PROTOS]; int serialDefaultsNum; int prevDx, prevDy; int accDx, accDy; int acc; CARD32 pnpLast; Bool disablePnPauto; float fracdx,fracdy; float sensitivity; } mousePrivRec, *mousePrivPtr; /* mouse proto flags */ #define MPF_NONE 0x00 #define MPF_SAFE 0x01 /* pnp.c */ MouseProtocolID MouseGetPnpProtocol(InputInfoPtr pInfo); Bool ps2Reset(InputInfoPtr pInfo); Bool ps2EnableDataReporting(InputInfoPtr pInfo); Bool ps2SendPacket(InputInfoPtr pInfo, unsigned char *bytes, int len); int ps2GetDeviceID(InputInfoPtr pInfo); #endif /* _X_MOUSE_H */ xf86-input-mouse-1.9.0/src/pnp.c0000664003204500007640000005350612012624123013261 00000000000000/* * Copyright 1998 by Kazutaka YOKOTA * * 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 Kazutaka YOKOTA not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Kazutaka YOKOTA makes no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * KAZUTAKA YOKOTA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KAZUTAKA YOKOTA 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include "inputstr.h" #include "scrnintstr.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86Xinput.h" #include "xf86_OSproc.h" #include "mouse.h" #include "mousePriv.h" #ifdef MOUSEINITDEBUG # define DEBUG # define EXTMOUSEDEBUG #endif /* serial PnP ID string */ typedef struct { int revision; /* PnP revision, 100 for 1.00 */ char *eisaid; /* EISA ID including mfr ID and product ID */ char *serial; /* serial No, optional */ char *class; /* device class, optional */ char *compat; /* list of compatible drivers, optional */ char *description; /* product description, optional */ int neisaid; /* length of the above fields... */ int nserial; int nclass; int ncompat; int ndescription; } pnpid_t; /* symbol table entry */ typedef struct { const char *name; MouseProtocolID val; } symtab_t; /* PnP EISA/product IDs */ static symtab_t pnpprod[] = { { "KML0001", PROT_THINKING }, /* Kensington ThinkingMouse */ { "MSH0001", PROT_IMSERIAL }, /* MS IntelliMouse */ { "MSH0004", PROT_IMSERIAL }, /* MS IntelliMouse TrackBall */ { "KYEEZ00", PROT_MS }, /* Genius EZScroll */ { "KYE0001", PROT_MS }, /* Genius PnP Mouse */ { "KYE0002", PROT_MS }, /* MouseSystem (Genius?) SmartScroll */ { "KYE0003", PROT_IMSERIAL }, /* Genius NetMouse */ { "KYE0004", PROT_IMSERIAL }, /* Genius NetScroll+ (serial) */ { "LGI800C", PROT_IMSERIAL }, /* Logitech MouseMan (4 button model) */ { "LGI8033", PROT_IMSERIAL }, /* Logitech Cordless MouseMan Wheel */ { "LGI8050", PROT_IMSERIAL }, /* Logitech MouseMan+ */ { "LGI8051", PROT_IMSERIAL }, /* Logitech FirstMouse+ */ { "LGI8001", PROT_LOGIMAN }, /* Logitech serial */ { "A4W0005", PROT_IMSERIAL }, /* A4 Tech 4D/4D+ Mouse */ { "PEC9802", PROT_IMSERIAL }, /* 8D Scroll Mouse */ { "PNP0F00", PROT_BM }, /* MS bus */ { "PNP0F01", PROT_MS }, /* MS serial */ { "PNP0F02", PROT_BM }, /* MS InPort */ { "PNP0F03", PROT_PS2 }, /* MS PS/2 */ /* * EzScroll returns PNP0F04 in the compatible device field; but it * doesn't look compatible... XXX */ { "PNP0F04", PROT_MSC }, /* MouseSystems */ { "PNP0F05", PROT_MSC }, /* MouseSystems */ #ifdef notyet { "PNP0F06", PROT_??? }, /* Genius Mouse */ { "PNP0F07", PROT_??? }, /* Genius Mouse */ #endif { "PNP0F08", PROT_LOGIMAN }, /* Logitech serial */ { "PNP0F09", PROT_MS }, /* MS BallPoint serial */ { "PNP0F0A", PROT_MS }, /* MS PnP serial */ { "PNP0F0B", PROT_MS }, /* MS PnP BallPoint serial */ { "PNP0F0C", PROT_MS }, /* MS serial compatible */ { "PNP0F0D", PROT_BM }, /* MS InPort compatible */ { "PNP0F0E", PROT_PS2 }, /* MS PS/2 compatible */ { "PNP0F0F", PROT_MS }, /* MS BallPoint compatible */ #ifdef notyet { "PNP0F10", PROT_??? }, /* TI QuickPort */ #endif { "PNP0F11", PROT_BM }, /* MS bus compatible */ { "PNP0F12", PROT_PS2 }, /* Logitech PS/2 */ { "PNP0F13", PROT_PS2 }, /* PS/2 */ #ifdef notyet { "PNP0F14", PROT_??? }, /* MS Kids Mouse */ #endif { "PNP0F15", PROT_BM }, /* Logitech bus */ #ifdef notyet { "PNP0F16", PROT_??? }, /* Logitech SWIFT */ #endif { "PNP0F17", PROT_LOGIMAN }, /* Logitech serial compat */ { "PNP0F18", PROT_BM }, /* Logitech bus compatible */ { "PNP0F19", PROT_PS2 }, /* Logitech PS/2 compatible */ #ifdef notyet { "PNP0F1A", PROT_??? }, /* Logitech SWIFT compatible */ { "PNP0F1B", PROT_??? }, /* HP Omnibook */ { "PNP0F1C", PROT_??? }, /* Compaq LTE TrackBall PS/2 */ { "PNP0F1D", PROT_??? }, /* Compaq LTE TrackBall serial */ { "PNP0F1E", PROT_??? }, /* MS Kids Trackball */ #endif { NULL, PROT_UNKNOWN }, }; static const char *pnpSerial[] = { "BaudRate", "1200", "DataBits", "7", "StopBits", "1", "Parity", "None", "FlowControl", "None", "VTime", "0", "VMin", "1", NULL }; static int pnpgets(InputInfoPtr, char *, Bool *prePNP); static int pnpparse(InputInfoPtr, pnpid_t *, char *, int); static MouseProtocolID prepnpparse(InputInfoPtr pInfo, char *buf); static symtab_t *pnpproto(pnpid_t *); static symtab_t *gettoken(symtab_t *, char *, int); static MouseProtocolID getPs2ProtocolPnP(InputInfoPtr pInfo); static MouseProtocolID probePs2ProtocolPnP(InputInfoPtr pInfo); static MouseProtocolID MouseGetSerialPnpProtocol(InputInfoPtr pInfo) { char buf[256]; /* PnP ID string may be up to 256 bytes long */ pnpid_t pnpid; symtab_t *t; int len; Bool prePNP; if ((len = pnpgets(pInfo, buf, &prePNP)) > 0) { if (!prePNP) { if (pnpparse(pInfo, &pnpid, buf, len) && (t = pnpproto(&pnpid)) != NULL) { xf86MsgVerb(X_INFO, 2, "%s: PnP-detected protocol ID: %d\n", pInfo->name, t->val); return (t->val); } } else return prepnpparse(pInfo,buf); } return PROT_UNKNOWN; } MouseProtocolID MouseGetPnpProtocol(InputInfoPtr pInfo) { MouseDevPtr pMse = pInfo->private; mousePrivPtr mPriv = (mousePrivPtr)pMse->mousePriv; MouseProtocolID val; CARD32 last; if ((val = MouseGetSerialPnpProtocol(pInfo)) != PROT_UNKNOWN) { if (val == MouseGetSerialPnpProtocol(pInfo)) return val; } last = mPriv->pnpLast; mPriv->pnpLast = currentTime.milliseconds; if (last) { if (last - currentTime.milliseconds < 100 || (mPriv->disablePnPauto && (last - currentTime.milliseconds < 10000))) { #ifdef EXTMOUSEDEBUG xf86ErrorF("Mouse: Disabling PnP\n"); #endif mPriv->disablePnPauto = TRUE; return PROT_UNKNOWN; } } #ifdef EXTMOUSEDEBUG if (mPriv->disablePnPauto) xf86ErrorF("Mouse: Enabling PnP\n"); #endif mPriv->disablePnPauto = FALSE; if (mPriv->soft) return getPs2ProtocolPnP(pInfo); else return probePs2ProtocolPnP(pInfo); } /* * Try to elicit a PnP ID as described in * Microsoft, Hayes: "Plug and Play External COM Device Specification, * rev 1.00", 1995. * * The routine does not fully implement the COM Enumerator as per Section * 2.1 of the document. In particular, we don't have idle state in which * the driver software monitors the com port for dynamic connection or * removal of a device at the port, because `moused' simply quits if no * device is found. * * In addition, as PnP COM device enumeration procedure slightly has * changed since its first publication, devices which follow earlier * revisions of the above spec. may fail to respond if the rev 1.0 * procedure is used. XXX */ static int pnpgets(InputInfoPtr pInfo, char *buf, Bool *prePNP) { int i; char c; pointer pnpOpts; #if 0 /* * This is the procedure described in rev 1.0 of PnP COM device spec. * Unfortunately, some devices which conform to earlier revisions of * the spec gets confused and do not return the ID string... */ /* port initialization (2.1.2) */ if ((i = xf86GetSerialModemState(pInfo->fd)) == -1) return 0; i |= XF86_M_DTR; /* DTR = 1 */ i &= ~XF86_M_RTS; /* RTS = 0 */ if (xf86SetSerialModemState(pInfo->fd, i) == -1) goto disconnect_idle; usleep(200000); if ((i = xf86GetSerialModemState(pInfo->fd)) == -1 || (i & XF86_M_DSR) == 0) goto disconnect_idle; /* port setup, 1st phase (2.1.3) */ pnpOpts = xf86OptionListCreate(pnpSerial, -1, 1); xf86SetSerial(pInfo->fd, pnpOpts); i = TIOCM_DTR | TIOCM_RTS; /* DTR = 0, RTS = 0 */ xf86SerialModemClearBits(pInfo->fd, i); usleep(200000); i = TIOCM_DTR; /* DTR = 1, RTS = 0 */ xf86SerialModemSetBits(pInfo->fd, i); usleep(200000); /* wait for response, 1st phase (2.1.4) */ xf86FlushInput(pInfo->fd); i = TIOCM_RTS; /* DTR = 1, RTS = 1 */ xf86SerialModemSetBits(pInfo->fd, i); /* try to read something */ if (xf86WaitForInput(pInfo->fd, 200000) <= 0) { /* port setup, 2nd phase (2.1.5) */ i = TIOCM_DTR | TIOCM_RTS; /* DTR = 0, RTS = 0 */ xf86SerialModemClearBits(pInfo->fd, i); usleep(200000); /* wait for response, 2nd phase (2.1.6) */ xf86FlushInput(pInfo->fd); i = TIOCM_DTR | TIOCM_RTS; /* DTR = 1, RTS = 1 */ xf86SerialModemSetBits(pInfo->fd, i); /* try to read something */ if (xf86WaitForInput(pInfo->fd, 200000) <= 0) goto connect_idle; } #else /* * This is a simplified procedure; it simply toggles RTS. */ if ((i = xf86GetSerialModemState(pInfo->fd)) == -1) return 0; i |= XF86_M_DTR; /* DTR = 1 */ i &= ~XF86_M_RTS; /* RTS = 0 */ if (xf86SetSerialModemState(pInfo->fd, i) == -1) goto disconnect_idle; usleep(200000); pnpOpts = xf86OptionListCreate(pnpSerial, -1, 1); xf86SetSerial(pInfo->fd, pnpOpts); /* wait for response */ xf86FlushInput(pInfo->fd); i = XF86_M_DTR | XF86_M_RTS; /* DTR = 1, RTS = 1 */ xf86SerialModemSetBits(pInfo->fd, i); /* try to read something */ if (xf86WaitForInput(pInfo->fd, 200000) <= 0) goto connect_idle; #endif /* collect PnP COM device ID (2.1.7) */ i = 0; *prePNP = FALSE; usleep(200000); /* the mouse must send `Begin ID' within 200msec */ while (xf86ReadSerial(pInfo->fd, &c, 1) == 1) { /* we may see "M", or "M3..." before `Begin ID' */ if (c == 'M') *prePNP = TRUE; if ((c == 0x08) || (c == 0x28)) { /* Begin ID */ *prePNP = FALSE; buf[0] = c; i = 1; break; } if (*prePNP) buf[i++] = c; if (xf86WaitForInput(pInfo->fd, 200000) <= 0) break; } if (i <= 0) { /* we haven't seen `Begin ID' in time... */ goto connect_idle; } if (*prePNP) return i; ++c; /* make it `End ID' */ for (;;) { if (xf86WaitForInput(pInfo->fd, 200000) <= 0) break; xf86ReadSerial(pInfo->fd, &buf[i], 1); if (buf[i++] == c) /* End ID */ break; if (i >= 256) break; } if (buf[i - 1] != c) goto connect_idle; return i; /* * According to PnP spec, we should set DTR = 1 and RTS = 0 while * in idle state. But, `moused' shall set DTR = RTS = 1 and proceed, * assuming there is something at the port even if it didn't * respond to the PnP enumeration procedure. */ disconnect_idle: i = XF86_M_DTR | XF86_M_RTS; /* DTR = 1, RTS = 1 */ xf86SerialModemSetBits(pInfo->fd, i); connect_idle: return 0; } static int pnpparse(InputInfoPtr pInfo, pnpid_t *id, char *buf, int len) { char s[3]; int offset; int sum = 0; int i, j; id->revision = 0; id->eisaid = NULL; id->serial = NULL; id->class = NULL; id->compat = NULL; id->description = NULL; id->neisaid = 0; id->nserial = 0; id->nclass = 0; id->ncompat = 0; id->ndescription = 0; offset = 0x28 - buf[0]; /* calculate checksum */ for (i = 0; i < len - 3; ++i) { sum += buf[i]; buf[i] += offset; } sum += buf[len - 1]; for (; i < len; ++i) buf[i] += offset; xf86MsgVerb(X_INFO, 2, "%s: PnP ID string: `%*.*s'\n", pInfo->name, len, len, buf); /* revision */ buf[1] -= offset; buf[2] -= offset; id->revision = ((buf[1] & 0x3f) << 6) | (buf[2] & 0x3f); xf86MsgVerb(X_INFO, 2, "%s: PnP rev %d.%02d\n", pInfo->name, id->revision / 100, id->revision % 100); /* EISA vender and product ID */ id->eisaid = &buf[3]; id->neisaid = 7; /* option strings */ i = 10; if (buf[i] == '\\') { /* device serial # */ for (j = ++i; i < len; ++i) { if (buf[i] == '\\') break; } if (i >= len) i -= 3; if (i - j == 8) { id->serial = &buf[j]; id->nserial = 8; } } if (buf[i] == '\\') { /* PnP class */ for (j = ++i; i < len; ++i) { if (buf[i] == '\\') break; } if (i >= len) i -= 3; if (i > j + 1) { id->class = &buf[j]; id->nclass = i - j; } } if (buf[i] == '\\') { /* compatible driver */ for (j = ++i; i < len; ++i) { if (buf[i] == '\\') break; } /* * PnP COM spec prior to v0.96 allowed '*' in this field, * it's not allowed now; just ignore it. */ if (buf[j] == '*') ++j; if (i >= len) i -= 3; if (i > j + 1) { id->compat = &buf[j]; id->ncompat = i - j; } } if (buf[i] == '\\') { /* product description */ for (j = ++i; i < len; ++i) { if (buf[i] == ';') break; } if (i >= len) i -= 3; if (i > j + 1) { id->description = &buf[j]; id->ndescription = i - j; } } /* checksum exists if there are any optional fields */ if ((id->nserial > 0) || (id->nclass > 0) || (id->ncompat > 0) || (id->ndescription > 0)) { xf86MsgVerb(X_INFO, 4, "%s: PnP checksum: 0x%02X\n", pInfo->name, sum); sprintf(s, "%02X", sum & 0x0ff); if (strncmp(s, &buf[len - 3], 2) != 0) { #if 0 /* * Checksum error!! * I found some mice do not comply with the PnP COM device * spec regarding checksum... XXX */ return FALSE; #endif } } return TRUE; } /* We can only identify MS at the moment */ static MouseProtocolID prepnpparse(InputInfoPtr pInfo, char *buf) { if (buf[0] == 'M' && buf[1] == '3') return PROT_MS; return PROT_UNKNOWN; } static symtab_t * pnpproto(pnpid_t *id) { symtab_t *t; int i, j; if (id->nclass > 0) if (strncmp(id->class, "MOUSE", id->nclass) != 0) /* this is not a mouse! */ return NULL; if (id->neisaid > 0) { t = gettoken(pnpprod, id->eisaid, id->neisaid); if (t->val != -1) return t; } /* * The 'Compatible drivers' field may contain more than one * ID separated by ','. */ if (id->ncompat <= 0) return NULL; for (i = 0; i < id->ncompat; ++i) { for (j = i; id->compat[i] != ','; ++i) if (i >= id->ncompat) break; if (i > j) { t = gettoken(pnpprod, id->compat + j, i - j); if (t->val != -1) return t; } } return NULL; } /* name/val mapping */ static symtab_t * gettoken(symtab_t *tab, char *s, int len) { int i; for (i = 0; tab[i].name != NULL; ++i) { if (strncmp(tab[i].name, s, len) == 0) break; } return &tab[i]; } /******************* PS/2 PnP probing ****************/ static int readMouse(InputInfoPtr pInfo, unsigned char *u) { if (xf86WaitForInput(pInfo->fd, 200000) <= 0) return FALSE; xf86ReadSerial(pInfo->fd, u, 1); return TRUE; } static void ps2DisableWrapMode(InputInfoPtr pInfo) { unsigned char reset_wrap_mode[] = { 0xEC }; ps2SendPacket(pInfo, reset_wrap_mode, sizeof(reset_wrap_mode)); } Bool ps2SendPacket(InputInfoPtr pInfo, unsigned char *bytes, int len) { unsigned char c; int i,j; #ifdef DEBUG xf86ErrorF("Ps/2 data package:"); for (i = 0; i < len; i++) xf86ErrorF(" %x", *(bytes + i)); xf86ErrorF("\n"); #endif for (i = 0; i < len; i++) { for (j = 0; j < 10; j++) { xf86WriteSerial(pInfo->fd, bytes + i, 1); usleep(10000); if (!readMouse(pInfo,&c)) { #ifdef DEBUG xf86ErrorF("sending 0x%x to PS/2 unsuccessful\n",*(bytes + i)); #endif return FALSE; } #ifdef DEBUG xf86ErrorF("Recieved: 0x%x\n",c); #endif if (c == 0xFA) /* ACK */ break; if (c == 0xFE) /* resend */ continue; if (c == 0xFC) /* error */ return FALSE; /* Some mice accidently enter wrap mode during init */ if (c == *(bytes + i) /* wrap mode */ && (*(bytes + i) != 0xEC)) /* avoid recursion */ ps2DisableWrapMode(pInfo); return FALSE; } if (j == 10) return FALSE; } return TRUE; } static Bool ps2DisableDataReporting(InputInfoPtr pInfo) { unsigned char packet[] = { 0xF5 }; return ps2SendPacket(pInfo, packet, sizeof(packet)); } Bool ps2EnableDataReporting(InputInfoPtr pInfo) { unsigned char packet[] = { 0xF4 }; return ps2SendPacket(pInfo, packet, sizeof(packet)); } int ps2GetDeviceID(InputInfoPtr pInfo) { unsigned char u; unsigned char packet[] = { 0xf2 }; usleep(30000); xf86FlushInput(pInfo->fd); if (!ps2SendPacket(pInfo, packet, sizeof(packet))) return -1; while (1) { if (!readMouse(pInfo,&u)) return -1; if (u != 0xFA) break; } #ifdef DEBUG xf86ErrorF("Obtained Mouse Type: %x\n",u); #endif return (int) u; } Bool ps2Reset(InputInfoPtr pInfo) { unsigned char u; unsigned char packet[] = { 0xff }; unsigned char reply[] = { 0xaa, 0x00 }; unsigned int i; #ifdef DEBUG xf86ErrorF("PS/2 Mouse reset\n"); #endif if (!ps2SendPacket(pInfo, packet, sizeof(packet))) return FALSE; /* we need a little delay here */ xf86WaitForInput(pInfo->fd, 500000); for (i = 0; i < sizeof(reply) ; i++) { if (!readMouse(pInfo,&u)) { goto EXIT; } if (u != reply[i]) goto EXIT; } return TRUE; EXIT: xf86FlushInput(pInfo->fd); return FALSE; } static MouseProtocolID probePs2ProtocolPnP(InputInfoPtr pInfo) { unsigned char u; MouseProtocolID ret = PROT_UNKNOWN; xf86FlushInput(pInfo->fd); ps2DisableDataReporting(pInfo); if (ps2Reset(pInfo)) { /* Reset PS2 device */ unsigned char seq[] = { 243, 200, 243, 100, 243, 80 }; /* Try to identify Intelli Mouse */ if (ps2SendPacket(pInfo, seq, sizeof(seq))) { u = ps2GetDeviceID(pInfo); if (u == 0x03) { /* found IntelliMouse now try IntelliExplorer */ unsigned char im_seq[] = { 243, 200, 243, 200, 243, 80 }; if (ps2SendPacket(pInfo,im_seq,sizeof(im_seq))) { u = ps2GetDeviceID(pInfo); if (u == 0x04) ret = PROT_EXPPS2; else ret = PROT_IMPS2; } } else if (ps2Reset(pInfo)) /* reset again to find sane state */ ret = PROT_PS2; } if (ret != PROT_UNKNOWN) ps2EnableDataReporting(pInfo); } return ret; } static struct ps2protos { int Id; MouseProtocolID protoID; } ps2 [] = { { 0x0, PROT_PS2 }, { 0x3, PROT_IMPS2 }, { 0x4, PROT_EXPPS2 }, { -1 , PROT_UNKNOWN } }; static MouseProtocolID getPs2ProtocolPnP(InputInfoPtr pInfo) { int Id; int i; MouseProtocolID proto; int count = 4; xf86FlushInput(pInfo->fd); while (--count) if (ps2DisableDataReporting(pInfo)) break; if (!count) { proto = PROT_UNKNOWN; goto EXIT; } if ((Id = ps2GetDeviceID(pInfo)) == -1) { proto = PROT_UNKNOWN; goto EXIT; } if (-1 == ps2EnableDataReporting(pInfo)) { proto = PROT_UNKNOWN; goto EXIT; } for (i = 0; ps2[i].protoID != PROT_UNKNOWN; i++) { if (ps2[i].Id == Id) { xf86MsgVerb(X_PROBED,2,"Found PS/2 proto ID %x\n",Id); proto = ps2[i].protoID; goto EXIT; } } proto = PROT_UNKNOWN; xf86Msg(X_ERROR,"Found unknown PS/2 proto ID %x\n",Id); EXIT: xf86FlushInput(pInfo->fd); return proto; } xf86-input-mouse-1.9.0/src/Makefile.am0000664003204500007640000000416312004412630014346 00000000000000# 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. AM_CFLAGS = $(CWARNFLAGS) AM_CPPFLAGS = -I$(top_srcdir)/include $(XORG_CFLAGS) # this is obnoxious: # -module lets us name the module exactly how we want # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. @DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la @DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version @DRIVER_NAME@_drv_ladir = @inputdir@ # We have to list all the mouse drivers here, even if we don't build them, so # they get included in distcheck. OS_SRCS = bsd_mouse.c hurd_mouse.c lnx_mouse.c sun_mouse.c @DRIVER_NAME@_drv_la_SOURCES = \ mouse.c \ mouse.h \ pnp.c \ mousePriv.h \ compat-api.h \ @OS_MOUSE_NAME@_mouse.c EXTRA_DIST = $(OS_SRCS) if LINT ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) lint: $(LINT) $(ALL_LINT_FLAGS) $(@DRIVER_NAME@_drv_la_SOURCES) endif LINT xf86-input-mouse-1.9.0/src/mouse.h0000664003204500007640000002571312034427367013637 00000000000000/* * Copyright (c) 1999-2003 by The XFree86 Project, Inc. * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 holder(s) * and author(s) 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 holder(s) and author(s). */ /* Public interface to OS-specific mouse support. */ #ifndef _XF86OSMOUSE_H_ #define _XF86OSMOUSE_H_ #include "xf86Xinput.h" #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 #define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options), NULL) #else #define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options)) #endif #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 18 #define LogMessageVerbSigSafe LogMessageVerb #endif /* Mouse interface classes */ #define MSE_NONE 0x00 #define MSE_SERIAL 0x01 /* serial port */ #define MSE_BUS 0x02 /* old bus mouse */ #define MSE_PS2 0x04 /* standard read-only PS/2 */ #define MSE_XPS2 0x08 /* extended PS/2 */ #define MSE_AUTO 0x10 /* auto-detect (PnP) */ #define MSE_MISC 0x20 /* The OS layer will identify the * specific protocol names that are * supported for this class. */ /* Mouse Protocol IDs. */ typedef enum { PROT_UNKNOWN = -2, PROT_UNSUP = -1, /* protocol is not supported */ PROT_MS = 0, PROT_MSC, PROT_MM, PROT_LOGI, PROT_LOGIMAN, PROT_MMHIT, PROT_GLIDE, PROT_IMSERIAL, PROT_THINKING, PROT_ACECAD, PROT_VALUMOUSESCROLL, PROT_PS2, PROT_GENPS2, PROT_IMPS2, PROT_EXPPS2, PROT_THINKPS2, PROT_MMPS2, PROT_GLIDEPS2, PROT_NETPS2, PROT_NETSCPS2, PROT_BM, PROT_AUTO, PROT_SYSMOUSE, PROT_WSMOUSE, PROT_VUID, PROT_NUMPROTOS /* This must always be last. */ } MouseProtocolID; struct _MouseDevRec; typedef int (*GetInterfaceTypesProc)(void); typedef const char **(*BuiltinNamesProc)(void); typedef Bool (*CheckProtocolProc)(const char *protocol); typedef Bool (*BuiltinPreInitProc)(InputInfoPtr pInfo, const char *protocol, int flags); typedef const char *(*DefaultProtocolProc)(void); typedef const char *(*SetupAutoProc)(InputInfoPtr pInfo, int *protoPara); typedef void (*SetResProc)(InputInfoPtr pInfo, const char* protocol, int rate, int res); typedef const char *(*FindDeviceProc)(InputInfoPtr pInfo, const char *protocol, int flags); typedef const char *(*GuessProtocolProc)(InputInfoPtr pInfo, int flags); /* * OSMouseInfoRec is used to pass information from the OSMouse layer to the * OS-independent mouse driver. */ typedef struct { GetInterfaceTypesProc SupportedInterfaces; BuiltinNamesProc BuiltinNames; CheckProtocolProc CheckProtocol; BuiltinPreInitProc PreInit; DefaultProtocolProc DefaultProtocol; SetupAutoProc SetupAuto; SetResProc SetPS2Res; SetResProc SetBMRes; SetResProc SetMiscRes; FindDeviceProc FindDevice; GuessProtocolProc GuessProtocol; } OSMouseInfoRec, *OSMouseInfoPtr; /* * SupportedInterfaces: Returns the mouse interface types that the OS support. * If MSE_MISC is returned, then the BuiltinNames and * CheckProtocol should be set. * * BuiltinNames: Returns the names of the protocols that are fully handled * in the OS-specific code. These are names that don't appear * directly in the main "mouse" driver. * * CheckProtocol: Checks if the protocol name given is supported by the * OS. It should return TRUE for both "builtin" protocols and * protocols of type MSE_MISC that are supported by the OS. * * PreInit: The PreInit function for protocols that are builtin. This * function is passed the protocol name. * * DefaultProtocol: Returns the name of a default protocol that should be used * for the OS when none has been supplied in the config file. * This should only be set when there is a reasonable default. * * SetupAuto: This function can be used to do OS-specific protocol * auto-detection. It returns the name of the detected protocol, * or NULL when detection fails. It may also adjust one or more * of the "protoPara" values for the detected protocol by setting * then to something other than -1. SetupAuto gets called in two * ways. The first is before any devices have been opened. This * can be used when the protocol "Auto" always maps to a single * protocol type. The second is with the device open, allowing * OS-specific probing to be done. * * SetPS2Res: Set the resolution and sample rate for MSE_PS2 and MSE_XPS2 * protocol types. * * SetBMRes: Set the resolution and sample rate for MSE_BM protocol types. * * SetMiscRes: Set the resolution and sample rate for MSE_MISC protocol types. * * FindDevice: This function gets called when no Device has been specified * in the config file. OS-specific methods may be used to guess * which input device to use. This function is called after the * pre-open attempts at protocol discovery are done, but before * the device is open. I.e., after the first SetupAuto() call, * after the DefaultProtocol() call, but before the PreInit() * call. Available protocol information may be used in locating * the default input device. * * GuessProtocol: A last resort attempt at guessing the mouse protocol by * whatever OS-specific means might be available. OS-independent * things should be in the mouse driver. This function gets * called after the mouse driver's OS-independent methods have * failed. */ extern OSMouseInfoPtr OSMouseInit(int flags); /* Z axis mapping */ #define MSE_NOZMAP 0 #define MSE_MAPTOX -1 #define MSE_MAPTOY -2 #define MSE_MAPTOZ -3 #define MSE_MAPTOW -4 /* Generalize for other axes. */ #define MSE_NOAXISMAP MSE_NOZMAP #define MSE_MAXBUTTONS 24 #define MSE_DFLTBUTTONS 3 /* * Mouse device record. This is shared by the mouse driver and the OSMouse * layer. */ typedef void (*checkMovementsProc)(InputInfoPtr,int, int); typedef void (*autoProbeProc)(InputInfoPtr, Bool, Bool); typedef Bool (*collectDataProc)(struct _MouseDevRec *, unsigned char); typedef Bool (*dataGoodProc)(struct _MouseDevRec *); typedef void (*PostMseEventProc)(InputInfoPtr pInfo, int buttons, int dx, int dy, int dz, int dw); typedef void (*MouseCommonOptProc)(InputInfoPtr pInfo); typedef struct _MouseDevRec { PtrCtrlProcPtr Ctrl; PostMseEventProc PostEvent; MouseCommonOptProc CommonOptions; DeviceIntPtr device; const char * protocol; MouseProtocolID protocolID; MouseProtocolID oldProtocolID; /* hack */ int class; int mseModel; int baudRate; int oldBaudRate; int sampleRate; int lastButtons; int buttons; /* # of buttons */ int emulateState; /* automata state for 2 button mode */ Bool emulate3Buttons; Bool emulate3ButtonsSoft; int emulate3Timeout;/* Timeout for 3 button emulation */ Bool chordMiddle; Bool flipXY; int invX; int invY; int resolution; int negativeZ; /* button mask */ int positiveZ; /* button mask */ int negativeW; /* button mask */ int positiveW; /* button mask */ pointer buffer; /* usually an XISBuffer* */ int protoBufTail; unsigned char protoBuf[8]; unsigned char protoPara[8]; unsigned char inSync; /* driver in sync with datastream */ pointer mousePriv; /* private area */ InputInfoPtr pInfo; Bool emulate3Pending;/* timer waiting */ CARD32 emulate3Expires;/* time to fire emulation code */ Bool emulateWheel; int wheelInertia; int wheelButton; int negativeX; /* Button values. Unlike the Z and */ int positiveX; /* W equivalents, these are button */ int negativeY; /* values rather than button masks. */ int positiveY; int wheelYDistance; int wheelXDistance; Bool autoProbe; checkMovementsProc checkMovements; autoProbeProc autoProbeMouse; collectDataProc collectData; dataGoodProc dataGood; int angleOffset; pointer pDragLock; /* drag lock area */ int xisbscale; /* buffer size for 1 event */ int wheelButtonTimeout;/* Timeout for the wheel button emulation */ CARD32 wheelButtonExpires; int doubleClickSourceButtonMask; int doubleClickTargetButton; int doubleClickTargetButtonMask; int doubleClickOldSourceState; int lastMappedButtons; int buttonMap[MSE_MAXBUTTONS]; } MouseDevRec, *MouseDevPtr; #endif /* _XF86OSMOUSE_H_ */ xf86-input-mouse-1.9.0/src/hurd_mouse.c0000664003204500007640000001552112034427367014650 00000000000000/* * Copyright 1997,1998 by UCHIYAMA Yasushi * * 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 UCHIYAMA Yasushi not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. UCHIYAMA Yasushi makes no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL UCHIYAMA YASUSHI 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. * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include "inputstr.h" #include "scrnintstr.h" #include "mipointer.h" #include "xf86.h" #include "xf86Xinput.h" #include "mouse.h" #include "xf86_OSlib.h" #include "xisb.h" #include #include #include #include #include #include #include #define DEFAULT_MOUSE_DEV "/dev/mouse" typedef unsigned short kev_type; /* kd event type */ typedef unsigned char Scancode; struct mouse_motion { short mm_deltaX; /* units? */ short mm_deltaY; }; typedef struct { kev_type type; /* see below */ struct timeval time; /* timestamp */ union { /* value associated with event */ boolean_t up; /* MOUSE_LEFT .. MOUSE_RIGHT */ Scancode sc; /* KEYBD_EVENT */ struct mouse_motion mmotion; /* MOUSE_MOTION */ } value; } kd_event; /* * kd_event ID's. */ #define MOUSE_LEFT 1 /* mouse left button up/down */ #define MOUSE_MIDDLE 2 #define MOUSE_RIGHT 3 #define MOUSE_MOTION 4 /* mouse motion */ #define KEYBD_EVENT 5 /* key up/down */ #define NUMEVENTS 64 /* * OsMouseReadInput -- * Get some events from our queue. Process all outstanding events now. */ static void OsMouseReadInput(InputInfoPtr pInfo) { MouseDevPtr pMse; static kd_event eventList[NUMEVENTS]; static int remainder = 0; int n, c; kd_event *event = eventList; unsigned char *pBuf; pMse = pInfo->private; XisbBlockDuration(pMse->buffer, -1); pBuf = (unsigned char *)eventList; n = remainder; while (n < sizeof(eventList) && (c = XisbRead(pMse->buffer)) >= 0) pBuf[n++] = (unsigned char)c; if (n == remainder) return; remainder = n % sizeof(kd_event); n /= sizeof(kd_event); while( n-- ) { int buttons = pMse->lastButtons; int dx = 0, dy = 0; switch (event->type) { case MOUSE_RIGHT: buttons = (buttons & 6) |(event->value.up ? 0 : 1); break; case MOUSE_MIDDLE: buttons = (buttons & 5) |(event->value.up ? 0 : 2); break; case MOUSE_LEFT: buttons = (buttons & 3) |(event->value.up ? 0 : 4) ; break; case MOUSE_MOTION: dx = event->value.mmotion.mm_deltaX; dy = - event->value.mmotion.mm_deltaY; break; default: LogMessageVerbSigSafe(X_ERROR, -1, "Bad mouse event (%d)\n",event->type); continue; } pMse->PostEvent(pInfo, buttons, dx, dy, 0, 0); ++event; } memcpy(eventList, event, remainder); return; } static Bool OsMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags) { MouseDevPtr pMse; /* This is called when the protocol is "OSMouse". */ pMse = pInfo->private; pMse->protocol = protocol; xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol); /* Collect the options, and process the common options. */ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 /* need some special handling here. xf86CollectInputOptions will reset * pInfo->options. To re-merge the previously set arguments, pass the * original pInfo->options in. */ xf86CollectInputOptions(pInfo, NULL, pInfo->options); #else COLLECT_INPUT_OPTIONS(pInfo, NULL); #endif xf86ProcessCommonOptions(pInfo, pInfo->options); /* Check if the device can be opened. */ pInfo->fd = xf86OpenSerial(pInfo->options); if (pInfo->fd == -1) { if (xf86GetAllowMouseOpenFail()) xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name); else { xf86Msg(X_ERROR, "%s: cannot open input device\n", pInfo->name); free(pMse); return FALSE; } } xf86CloseSerial(pInfo->fd); pInfo->fd = -1; /* Process common mouse options (like Emulate3Buttons, etc). */ pMse->CommonOptions(pInfo); /* Setup the local procs. */ pInfo->read_input = OsMouseReadInput; #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 pInfo->flags |= XI86_CONFIGURED; #endif return TRUE; } static const char * FindDevice(InputInfoPtr pInfo, const char *protocol, int flags) { static const char path[] = DEFAULT_MOUSE_DEV; int fd; SYSCALL (fd = open(path, O_RDWR | O_NONBLOCK | O_EXCL)); if (fd == -1) return NULL; close(fd); pInfo->options = xf86AddNewOption(pInfo->options, "Device", path); xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n", pInfo->name, path); return path; } static int SupportedInterfaces(void) { /* XXX Need to check this. */ return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO; } static const char *internalNames[] = { "OSMouse", NULL }; static const char ** BuiltinNames(void) { return internalNames; } static Bool CheckProtocol(const char *protocol) { int i; for (i = 0; internalNames[i]; i++) if (xf86NameCmp(protocol, internalNames[i]) == 0) return TRUE; return FALSE; } static const char * DefaultProtocol(void) { return "OSMouse"; } OSMouseInfoPtr OSMouseInit(int flags) { OSMouseInfoPtr p; p = calloc(sizeof(OSMouseInfoRec), 1); if (!p) return NULL; p->SupportedInterfaces = SupportedInterfaces; p->BuiltinNames = BuiltinNames; p->FindDevice = FindDevice; p->DefaultProtocol = DefaultProtocol; p->CheckProtocol = CheckProtocol; p->PreInit = OsMousePreInit; return p; } xf86-input-mouse-1.9.0/src/sun_mouse.c0000664003204500007640000005575712034427367014532 00000000000000/* * Copyright (c) 2004-2005, 2008-2010, Oracle and/or its affiliates. * All rights reserved. * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS 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. */ /* * Copyright 1999-2001 The XFree86 Project, Inc. All Rights Reserved. * * 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 the * rights to use, copy, modify, merge, publish, distribute, sublicense, 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 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 * XFREE86 PROJECT 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 XFree86 Project 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 * XFree86 Project. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xorg-server.h" #include "xf86.h" #include "xf86_OSlib.h" #include "mouse.h" #include "xisb.h" #include "mipointer.h" #include #include #include /* Wheel mouse support in VUID drivers in Solaris 9 updates & Solaris 10 */ #ifdef WHEEL_DEVID /* Defined in vuid_event.h if VUID wheel support present */ # define HAVE_VUID_WHEEL #endif #ifdef HAVE_VUID_WHEEL # include #endif /* Support for scaling absolute coordinates to screen size in * Solaris 10 updates and beyond */ #if !defined(HAVE_ABSOLUTE_MOUSE_SCALING) # ifdef MSIOSRESOLUTION /* Defined in msio.h if scaling support present */ # define HAVE_ABSOLUTE_MOUSE_SCALING # endif #endif /* Names of protocols that are handled internally here. */ static const char *internalNames[] = { "VUID", NULL }; static const char *solarisMouseDevs[] = { /* Device file: Protocol: */ "/dev/mouse", "VUID", /* USB or SPARC */ #if defined(__i386) || defined(__x86) "/dev/kdmouse", "PS/2", /* PS/2 */ #endif NULL }; typedef struct _VuidMseRec { struct _VuidMseRec *next; InputInfoPtr pInfo; Firm_event event; unsigned char * buffer; char * strmod; Bool(*wrapped_device_control)(DeviceIntPtr device, int what); #ifdef HAVE_ABSOLUTE_MOUSE_SCALING Ms_screen_resolution absres; #endif OsTimerPtr remove_timer; /* Callback for removal on ENODEV */ } VuidMseRec, *VuidMsePtr; static VuidMsePtr vuidMouseList = NULL; static int vuidMouseProc(DeviceIntPtr pPointer, int what); static void vuidReadInput(InputInfoPtr pInfo); #ifdef HAVE_ABSOLUTE_MOUSE_SCALING # include "compat-api.h" static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse); static void vuidMouseAdjustFrame(ADJUST_FRAME_ARGS_DECL); static int vuidMouseGeneration = 0; #if HAS_DEVPRIVATEKEYREC static DevPrivateKeyRec vuidMouseScreenIndex; #else static int vuidMouseScreenIndex; #endif /* HAS_DEVPRIVATEKEYREC */ #define vuidMouseGetScreenPrivate(s) ( \ dixLookupPrivate(&(s)->devPrivates, &vuidMouseScreenIndex)) #define vuidMouseSetScreenPrivate(s,p) \ dixSetPrivate(&(s)->devPrivates, &vuidMouseScreenIndex, (void *) p) #endif /* HAVE_ABSOLUTE_MOUSE_SCALING */ static inline VuidMsePtr getVuidMsePriv(InputInfoPtr pInfo) { VuidMsePtr m = vuidMouseList; while ((m != NULL) && (m->pInfo != pInfo)) { m = m->next; } return m; } /* Called from OsTimer callback, since removing a device from the device list or changing pInfo->fd while xf86Wakeup is looping through the list causes server crashes */ static CARD32 vuidRemoveMouse(OsTimerPtr timer, CARD32 now, pointer arg) { InputInfoPtr pInfo = (InputInfoPtr) arg; xf86DisableDevice(pInfo->dev, TRUE); return 0; /* All done, don't set to run again */ } /* * Initialize and enable the mouse wheel, if present. * * Returns 1 if mouse wheel was successfully enabled. * Returns 0 if an error occurred or if there is no mouse wheel. */ static int vuidMouseWheelInit(InputInfoPtr pInfo) { #ifdef HAVE_VUID_WHEEL wheel_state wstate; int nwheel = -1; int i; wstate.vers = VUID_WHEEL_STATE_VERS; wstate.id = 0; wstate.stateflags = (uint32_t) -1; SYSCALL(i = ioctl(pInfo->fd, VUIDGWHEELCOUNT, &nwheel)); if (i != 0) return (0); SYSCALL(i = ioctl(pInfo->fd, VUIDGWHEELSTATE, &wstate)); if (i != 0) { xf86Msg(X_WARNING, "%s: couldn't get wheel state\n", pInfo->name); return (0); } wstate.stateflags |= VUID_WHEEL_STATE_ENABLED; SYSCALL(i = ioctl(pInfo->fd, VUIDSWHEELSTATE, &wstate)); if (i != 0) { xf86Msg(X_WARNING, "%s: couldn't enable wheel\n", pInfo->name); return (0); } return (1); #else return (0); #endif } /* This function is called when the protocol is "VUID". */ static Bool vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags) { MouseDevPtr pMse = pInfo->private; VuidMsePtr pVuidMse; /* Ensure we don't add the same device twice */ if (getVuidMsePriv(pInfo) != NULL) return TRUE; pVuidMse = calloc(sizeof(VuidMseRec), 1); if (pVuidMse == NULL) { xf86Msg(X_ERROR, "%s: cannot allocate VuidMouseRec\n", pInfo->name); free(pMse); return FALSE; } pVuidMse->buffer = (unsigned char *)&pVuidMse->event; pVuidMse->strmod = xf86SetStrOption(pInfo->options, "StreamsModule", NULL); /* Setup the local procs. */ pVuidMse->wrapped_device_control = pInfo->device_control; pInfo->device_control = vuidMouseProc; pInfo->read_input = vuidReadInput; pMse->xisbscale = sizeof(Firm_event); #ifdef HAVE_ABSOLUTE_MOUSE_SCALING pVuidMse->absres.height = pVuidMse->absres.width = 0; #endif pVuidMse->pInfo = pInfo; pVuidMse->next = vuidMouseList; vuidMouseList = pVuidMse; #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 pInfo->flags |= XI86_CONFIGURED; #endif return TRUE; } static void vuidFlushAbsEvents(InputInfoPtr pInfo, int absX, int absY, Bool *absXset, Bool *absYset) { #ifdef DEBUG ErrorF("vuidFlushAbsEvents: %d,%d (set: %d, %d)\n", absX, absY, *absXset, *absYset); #endif if ((*absXset) && (*absYset)) { xf86PostMotionEvent(pInfo->dev, /* is_absolute: */ TRUE, /* first_valuator: */ 0, /* num_valuators: */ 2, absX, absY); } else if (*absXset) { xf86PostMotionEvent(pInfo->dev, /* is_absolute: */ TRUE, /* first_valuator: */ 0, /* num_valuators: */ 1, absX); } else if (*absYset) { xf86PostMotionEvent(pInfo->dev, /* is_absolute: */ TRUE, /* first_valuator: */ 1, /* num_valuators: */ 1, absY); } *absXset = FALSE; *absYset = FALSE; } static void vuidReadInput(InputInfoPtr pInfo) { MouseDevPtr pMse; VuidMsePtr pVuidMse; int buttons; int dx = 0, dy = 0, dz = 0, dw = 0; unsigned int n; unsigned char *pBuf; int absX = 0, absY = 0; Bool absXset = FALSE, absYset = FALSE; pMse = pInfo->private; pVuidMse = getVuidMsePriv(pInfo); buttons = pMse->lastButtons; pBuf = pVuidMse->buffer; n = 0; do { n = read(pInfo->fd, pBuf, sizeof(Firm_event)); if (n == 0) { break; } else if (n == -1) { switch (errno) { case EAGAIN: /* Nothing to read now */ n = 0; /* End loop, go on to flush events & return */ continue; case EINTR: /* Interrupted, try again */ continue; case ENODEV: /* May happen when USB mouse is unplugged */ /* We use X_NONE here because it didn't alloc since we may be called from SIGIO handler. No longer true for sigsafe logging, but matters for older servers */ LogMessageVerbSigSafe(X_NONE, 0, "%s: Device no longer present - removing.\n", pInfo->name); xf86RemoveEnabledDevice(pInfo); pVuidMse->remove_timer = TimerSet(pVuidMse->remove_timer, 0, 1, vuidRemoveMouse, pInfo); return; default: /* All other errors */ /* We use X_NONE here because it didn't alloc since we may be called from SIGIO handler. No longer true for sigsafe logging, but matters for older servers */ LogMessageVerbSigSafe(X_NONE, 0, "%s: Read error: %s\n", pInfo->name, strerror(errno)); return; } } else if (n != sizeof(Firm_event)) { xf86Msg(X_WARNING, "%s: incomplete packet, size %d\n", pInfo->name, n); } #ifdef DEBUG LogMessageVerbSigSafe("vuidReadInput: event type: %d value: %d\n", pVuidMse->event.id, pVuidMse->event.value); #endif if (pVuidMse->event.id >= BUT_FIRST && pVuidMse->event.id <= BUT_LAST) { /* button */ int butnum = pVuidMse->event.id - BUT_FIRST; if (butnum < 3) butnum = 2 - butnum; if (!pVuidMse->event.value) buttons &= ~(1 << butnum); else buttons |= (1 << butnum); } else if (pVuidMse->event.id >= VLOC_FIRST && pVuidMse->event.id <= VLOC_LAST) { /* axis */ int delta = pVuidMse->event.value; switch(pVuidMse->event.id) { case LOC_X_DELTA: dx += delta; break; case LOC_Y_DELTA: dy -= delta; break; case LOC_X_ABSOLUTE: if (absXset) { vuidFlushAbsEvents(pInfo, absX, absY, &absXset, &absYset); } absX = delta; absXset = TRUE; break; case LOC_Y_ABSOLUTE: if (absYset) { vuidFlushAbsEvents(pInfo, absX, absY, &absXset, &absYset); } absY = delta; absYset = TRUE; break; } } #ifdef HAVE_VUID_WHEEL else if (vuid_in_range(VUID_WHEEL, pVuidMse->event.id)) { if (vuid_id_offset(pVuidMse->event.id) == 0) dz -= VUID_WHEEL_GETDELTA(pVuidMse->event.value); else dw -= VUID_WHEEL_GETDELTA(pVuidMse->event.value); } #endif #ifdef HAVE_ABSOLUTE_MOUSE_SCALING else if (pVuidMse->event.id == MOUSE_TYPE_ABSOLUTE) { ScreenPtr ptrCurScreen; /* force sending absolute resolution scaling ioctl */ pVuidMse->absres.height = pVuidMse->absres.width = 0; ptrCurScreen = miPointerGetScreen(pInfo->dev); vuidMouseSendScreenSize(ptrCurScreen, pVuidMse); } #endif } while (n != 0); if (absXset || absYset) { vuidFlushAbsEvents(pInfo, absX, absY, &absXset, &absYset); } pMse->PostEvent(pInfo, buttons, dx, dy, dz, dw); return; } #ifdef HAVE_ABSOLUTE_MOUSE_SCALING static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse) { InputInfoPtr pInfo = pVuidMse->pInfo; ScrnInfoPtr pScr = XF86SCRNINFO(pScreen); int result; if (!pScr->currentMode) return; if ((pVuidMse->absres.width != pScr->currentMode->HDisplay) || (pVuidMse->absres.height != pScr->currentMode->VDisplay)) { pVuidMse->absres.width = pScr->currentMode->HDisplay; pVuidMse->absres.height = pScr->currentMode->VDisplay; do { result = ioctl(pInfo->fd, MSIOSRESOLUTION, &(pVuidMse->absres)); } while ( (result != 0) && (errno == EINTR) ); if (result != 0) { LogMessageVerbSigSafe(X_WARNING, -1, "%s: couldn't set absolute mouse scaling resolution: %s\n", pInfo->name, strerror(errno)); #ifdef DEBUG } else { LogMessageVerbSigSafe(X_INFO, "%s: absolute mouse scaling resolution set to %d x %d\n", pInfo->name, pVuidMse->absres.width, pVuidMse->absres.height); #endif } } } static void vuidMouseAdjustFrame(ADJUST_FRAME_ARGS_DECL) { SCRN_INFO_PTR(arg); ScreenPtr pScreen = xf86ScrnToScreen(pScrn); xf86AdjustFrameProc *wrappedAdjustFrame = (xf86AdjustFrameProc *) vuidMouseGetScreenPrivate(pScreen); VuidMsePtr m; ScreenPtr ptrCurScreen; if (wrappedAdjustFrame) { pScrn->AdjustFrame = wrappedAdjustFrame; (*pScrn->AdjustFrame)(ADJUST_FRAME_ARGS(pScrn, x, y)); pScrn->AdjustFrame = vuidMouseAdjustFrame; } for (m = vuidMouseList; m != NULL ; m = m->next) { ptrCurScreen = miPointerGetScreen(m->pInfo->dev); if (ptrCurScreen == pScreen) { vuidMouseSendScreenSize(pScreen, m); } } } #endif /* HAVE_ABSOLUTE_MOUSE_SCALING */ static int vuidMouseProc(DeviceIntPtr pPointer, int what) { InputInfoPtr pInfo; MouseDevPtr pMse; VuidMsePtr pVuidMse; int ret = Success; int i; pInfo = pPointer->public.devicePrivate; pMse = pInfo->private; pMse->device = pPointer; pVuidMse = getVuidMsePriv(pInfo); if (pVuidMse == NULL) { return BadImplementation; } switch (what) { case DEVICE_INIT: #ifdef HAVE_ABSOLUTE_MOUSE_SCALING #if HAS_DEVPRIVATEKEYREC if (!dixRegisterPrivateKey(&vuidMouseScreenIndex, PRIVATE_SCREEN, 0)) return BadAlloc; #endif /* HAS_DEVPRIVATEKEYREC */ if (vuidMouseGeneration != serverGeneration) { for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen); vuidMouseSetScreenPrivate(pScreen, pScrn->AdjustFrame); pScrn->AdjustFrame = vuidMouseAdjustFrame; } vuidMouseGeneration = serverGeneration; } #endif ret = pVuidMse->wrapped_device_control(pPointer, what); break; case DEVICE_ON: ret = pVuidMse->wrapped_device_control(pPointer, DEVICE_ON); if ((ret == Success) && (pInfo->fd != -1)) { int fmt = VUID_FIRM_EVENT; if (pVuidMse->strmod) { /* Check to see if module is already pushed */ SYSCALL(i = ioctl(pInfo->fd, I_FIND, pVuidMse->strmod)); if (i == 0) { /* Not already pushed */ SYSCALL(i = ioctl(pInfo->fd, I_PUSH, pVuidMse->strmod)); if (i < 0) { xf86Msg(X_WARNING, "%s: cannot push module '%s' " "onto mouse device: %s\n", pInfo->name, pVuidMse->strmod, strerror(errno)); free(pVuidMse->strmod); pVuidMse->strmod = NULL; } } } SYSCALL(i = ioctl(pInfo->fd, VUIDSFORMAT, &fmt)); if (i < 0) { xf86Msg(X_WARNING, "%s: cannot set mouse device to VUID mode: %s\n", pInfo->name, strerror(errno)); } vuidMouseWheelInit(pInfo); #ifdef HAVE_ABSOLUTE_MOUSE_SCALING vuidMouseSendScreenSize(screenInfo.screens[0], pVuidMse); #endif xf86FlushInput(pInfo->fd); /* Allocate here so we don't alloc in ReadInput which may be called from SIGIO handler. */ if (pVuidMse->remove_timer == NULL) { pVuidMse->remove_timer = TimerSet(pVuidMse->remove_timer, 0, 0, NULL, NULL); } } break; case DEVICE_OFF: case DEVICE_CLOSE: if (pInfo->fd != -1) { if (pVuidMse->strmod) { SYSCALL(i = ioctl(pInfo->fd, I_POP, pVuidMse->strmod)); if (i == -1) { xf86Msg(X_WARNING, "%s: cannot pop module '%s' off mouse device: %s\n", pInfo->name, pVuidMse->strmod, strerror(errno)); } } } if (pVuidMse->remove_timer) { TimerFree(pVuidMse->remove_timer); pVuidMse->remove_timer = NULL; } ret = pVuidMse->wrapped_device_control(pPointer, what); break; default: /* Should never be called, but just in case */ ret = pVuidMse->wrapped_device_control(pPointer, what); break; } return ret; } static Bool sunMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags) { /* The protocol is guaranteed to be one of the internalNames[] */ if (xf86NameCmp(protocol, "VUID") == 0) { return vuidPreInit(pInfo, protocol, flags); } return TRUE; } static const char ** BuiltinNames(void) { return internalNames; } static Bool CheckProtocol(const char *protocol) { int i; for (i = 0; internalNames[i]; i++) if (xf86NameCmp(protocol, internalNames[i]) == 0) return TRUE; return FALSE; } static const char * DefaultProtocol(void) { return "Auto"; } static Bool solarisMouseAutoProbe(InputInfoPtr pInfo, const char **protocol, const char **device) { const char **pdev, **pproto; int fd = -1; Bool found; char *strmod; if (*device == NULL) { /* Check to see if xorg.conf or HAL specified a device to use */ *device = xf86CheckStrOption(pInfo->options, "Device", NULL); } if (*device != NULL) { strmod = xf86CheckStrOption(pInfo->options, "StreamsModule", NULL); if (strmod) { /* if a device name is already known, and a StreamsModule is specified to convert events to VUID, then we don't need to probe further */ *protocol = "VUID"; return TRUE; } } for (pdev = solarisMouseDevs; *pdev; pdev += 2) { pproto = pdev + 1; if ((*protocol != NULL) && (strcmp(*protocol, "Auto") != 0) && (*pproto != NULL) && (strcmp(*pproto, *protocol) != 0)) { continue; } if ((*device != NULL) && (strcmp(*device, *pdev) != 0)) { continue; } SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK)); if (fd == -1) { #ifdef DEBUG ErrorF("Cannot open %s (%s)\n", pdev, strerror(errno)); #endif } else { found = TRUE; if ((*pproto != NULL) && (strcmp(*pproto, "VUID") == 0)) { int i, r; SYSCALL(r = ioctl(fd, VUIDGFORMAT, &i)); if (r < 0) { found = FALSE; } } close(fd); if (found == TRUE) { if (*pproto != NULL) { *protocol = *pproto; } *device = *pdev; return TRUE; } } } return FALSE; } static const char * SetupAuto(InputInfoPtr pInfo, int *protoPara) { const char *pdev = NULL; const char *pproto = NULL; MouseDevPtr pMse = pInfo->private; if (pInfo->fd == -1) { /* probe to find device/protocol to use */ if (solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) { /* Set the Device option. */ pInfo->options = xf86AddNewOption(pInfo->options, "Device", pdev); xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n", pInfo->name, pdev); } } else if (pMse->protocolID == PROT_AUTO) { pdev = xf86CheckStrOption(pInfo->options, "Device", NULL); if ((solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) && (pproto != NULL)) sunMousePreInit(pInfo, pproto, 0); } return pproto; } static const char * FindDevice(InputInfoPtr pInfo, const char *protocol, int flags) { const char *pdev = NULL; const char *pproto = protocol; if (solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) { /* Set the Device option. */ pInfo->options = xf86AddNewOption(pInfo->options, "Device", pdev); xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n", pInfo->name, pdev); } return pdev; } static int SupportedInterfaces(void) { /* XXX This needs to be checked. */ return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO | MSE_XPS2 | MSE_MISC; } OSMouseInfoPtr OSMouseInit(int flags) { OSMouseInfoPtr p; p = calloc(sizeof(OSMouseInfoRec), 1); if (!p) return NULL; p->SupportedInterfaces = SupportedInterfaces; p->BuiltinNames = BuiltinNames; p->CheckProtocol = CheckProtocol; p->PreInit = sunMousePreInit; p->DefaultProtocol = DefaultProtocol; p->SetupAuto = SetupAuto; p->FindDevice = FindDevice; return p; } xf86-input-mouse-1.9.0/src/mouse.c0000664003204500007640000040240712034427367013631 00000000000000/* * * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. * Copyright 1993 by David Dawes * 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 names of copyright holders not be * used in advertising or publicity pertaining to distribution of the * software without specific, written prior permission. The copyright holders * make no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS 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. * */ /* Patch for PS/2 Intellimouse - Tim Goodwin 1997-11-06. */ /* * [JCH-96/01/21] Added fourth button support for PROT_GLIDEPOINT mouse * protocol. */ /* * [TVO-97/03/05] Added microsoft IntelliMouse support */ /* * [PME-02/08/11] Added suport for drag lock buttons * for use with 4 button trackballs for convenience * and to help limited dexterity persons */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include "xf86.h" #include #include "extnsionst.h" #include "extinit.h" #include "xf86Xinput.h" #include "xf86_OSproc.h" #include "exevents.h" #include #include "xserver-properties.h" #include "xf86-mouse-properties.h" #include "compiler.h" #include "xisb.h" #include "mouse.h" #include "mousePriv.h" #include "mipointer.h" enum { /* number of bits in mapped nibble */ NIB_BITS=4, /* size of map of nibbles to bitmask */ NIB_SIZE= (1 << NIB_BITS), /* mask for map */ NIB_MASK= (NIB_SIZE -1), /* number of maps to map all the buttons */ NIB_COUNT = ((MSE_MAXBUTTONS+NIB_BITS-1)/NIB_BITS) }; /*data to be used in implementing trackball drag locks.*/ typedef struct _DragLockRec { /* Fields used to implement trackball drag locks. */ /* mask for those buttons that are ordinary drag lock buttons */ int lockButtonsM; /* mask for the master drag lock button if any */ int masterLockM; /* button state up/down from last time adjusted for drag locks */ int lockLastButtons; /* * true if master lock state i.e. master drag lock * button has just been pressed */ int masterTS; /* simulate these buttons being down although they are not */ int simulatedDown; /* * data to map bits for drag lock buttons to corresponding * bits for the target buttons */ int nib_table[NIB_COUNT][NIB_SIZE]; } DragLockRec, *DragLockPtr; #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 static InputInfoPtr MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags); #else static int MousePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); #endif static int MouseProc(DeviceIntPtr device, int what); static void MouseCtrl(DeviceIntPtr device, PtrCtrl *ctrl); static void MousePostEvent(InputInfoPtr pInfo, int buttons, int dx, int dy, int dz, int dw); static void MouseReadInput(InputInfoPtr pInfo); static void MouseBlockHandler(pointer data, struct timeval **waitTime, pointer LastSelectMask); static void MouseWakeupHandler(pointer data, int i, pointer LastSelectMask); static void FlushButtons(MouseDevPtr pMse); static Bool SetupMouse(InputInfoPtr pInfo); static Bool initMouseHW(InputInfoPtr pInfo); #ifdef SUPPORT_MOUSE_RESET static Bool mouseReset(InputInfoPtr pInfo, unsigned char val); static void ps2WakeupHandler(pointer data, int i, pointer LastSelectMask); static void ps2BlockHandler(pointer data, struct timeval **waitTime, pointer LastSelectMask); #endif static void Emulate3ButtonsSetEnabled(InputInfoPtr pInfo, Bool enable); /* mouse autoprobe stuff */ static const char *autoOSProtocol(InputInfoPtr pInfo, int *protoPara); static void autoProbeMouse(InputInfoPtr pInfo, Bool inSync, Bool lostSync); static void checkForErraticMovements(InputInfoPtr pInfo, int dx, int dy); static Bool collectData(MouseDevPtr pMse, unsigned char u); static void SetMouseProto(MouseDevPtr pMse, MouseProtocolID protocolID); static Bool autoGood(MouseDevPtr pMse); #undef MOUSE _X_EXPORT InputDriverRec MOUSE = { 1, "mouse", NULL, MousePreInit, NULL, NULL, }; #define RETRY_COUNT 4 /* Properties that can be set at runtime via xinput */ static Atom prop_mbemu = 0; /* Middle button emulation on/off property */ static Atom prop_mbtimeout = 0; /* Middle button timeout property */ /* * Microsoft (all serial models), Logitech MouseMan, First Mouse, etc, * ALPS GlidePoint, Thinking Mouse. */ static const char *msDefaults[] = { "BaudRate", "1200", "DataBits", "7", "StopBits", "1", "Parity", "None", "FlowControl", "None", "VTime", "0", "VMin", "1", NULL }; /* MouseSystems */ static const char *mlDefaults[] = { "BaudRate", "1200", "DataBits", "8", "StopBits", "2", "Parity", "None", "FlowControl", "None", "VTime", "0", "VMin", "1", NULL }; /* MMSeries */ static const char *mmDefaults[] = { "BaudRate", "1200", "DataBits", "8", "StopBits", "1", "Parity", "Odd", "FlowControl", "None", "VTime", "0", "VMin", "1", NULL }; /* Hitachi Tablet */ static const char *mmhitDefaults[] = { "BaudRate", "1200", "DataBits", "8", "StopBits", "1", "Parity", "None", "FlowControl", "None", "VTime", "0", "VMin", "1", NULL }; /* AceCad Tablet */ static const char *acecadDefaults[] = { "BaudRate", "9600", "DataBits", "8", "StopBits", "1", "Parity", "Odd", "FlowControl", "None", "VTime", "0", "VMin", "1", NULL }; static MouseProtocolRec mouseProtocols[] = { /* Serial protocols */ { "Microsoft", MSE_SERIAL, msDefaults, PROT_MS }, { "MouseSystems", MSE_SERIAL, mlDefaults, PROT_MSC }, { "MMSeries", MSE_SERIAL, mmDefaults, PROT_MM }, { "Logitech", MSE_SERIAL, mlDefaults, PROT_LOGI }, { "MouseMan", MSE_SERIAL, msDefaults, PROT_LOGIMAN }, { "MMHitTab", MSE_SERIAL, mmhitDefaults, PROT_MMHIT }, { "GlidePoint", MSE_SERIAL, msDefaults, PROT_GLIDE }, { "IntelliMouse", MSE_SERIAL, msDefaults, PROT_IMSERIAL }, { "ThinkingMouse", MSE_SERIAL, msDefaults, PROT_THINKING }, { "AceCad", MSE_SERIAL, acecadDefaults, PROT_ACECAD }, { "ValuMouseScroll", MSE_SERIAL, msDefaults, PROT_VALUMOUSESCROLL }, /* Standard PS/2 */ { "PS/2", MSE_PS2, NULL, PROT_PS2 }, { "GenericPS/2", MSE_PS2, NULL, PROT_GENPS2 }, /* Extended PS/2 */ { "ImPS/2", MSE_XPS2, NULL, PROT_IMPS2 }, { "ExplorerPS/2", MSE_XPS2, NULL, PROT_EXPPS2 }, { "ThinkingMousePS/2", MSE_XPS2, NULL, PROT_THINKPS2 }, { "MouseManPlusPS/2", MSE_XPS2, NULL, PROT_MMPS2 }, { "GlidePointPS/2", MSE_XPS2, NULL, PROT_GLIDEPS2 }, { "NetMousePS/2", MSE_XPS2, NULL, PROT_NETPS2 }, { "NetScrollPS/2", MSE_XPS2, NULL, PROT_NETSCPS2 }, /* Bus Mouse */ { "BusMouse", MSE_BUS, NULL, PROT_BM }, /* Auto-detect (PnP) */ { "Auto", MSE_AUTO, NULL, PROT_AUTO }, /* Misc (usually OS-specific) */ { "SysMouse", MSE_MISC, mlDefaults, PROT_SYSMOUSE }, { "WSMouse", MSE_MISC, NULL, PROT_WSMOUSE }, { "VUID", MSE_MISC, NULL, PROT_VUID }, /* end of list */ { NULL, MSE_NONE, NULL, PROT_UNKNOWN } }; /* Process options common to all mouse types. */ static void MouseCommonOptions(InputInfoPtr pInfo) { MouseDevPtr pMse; MessageType buttons_from = X_CONFIG; char *s; int origButtons; int i; pMse = pInfo->private; pMse->buttons = xf86SetIntOption(pInfo->options, "Buttons", 0); if (!pMse->buttons) { pMse->buttons = MSE_DFLTBUTTONS; buttons_from = X_DEFAULT; } origButtons = pMse->buttons; pMse->emulate3Buttons = xf86SetBoolOption(pInfo->options, "Emulate3Buttons", FALSE); if (!xf86FindOptionValue(pInfo->options,"Emulate3Buttons")) { pMse->emulate3ButtonsSoft = TRUE; pMse->emulate3Buttons = TRUE; } pMse->emulate3Timeout = xf86SetIntOption(pInfo->options, "Emulate3Timeout", 50); if (pMse->emulate3Buttons || pMse->emulate3ButtonsSoft) { MessageType from = X_CONFIG; if (pMse->emulate3ButtonsSoft) from = X_DEFAULT; xf86Msg(from, "%s: Emulate3Buttons, Emulate3Timeout: %d\n", pInfo->name, pMse->emulate3Timeout); } pMse->chordMiddle = xf86SetBoolOption(pInfo->options, "ChordMiddle", FALSE); pMse->flipXY = xf86SetBoolOption(pInfo->options, "FlipXY", FALSE); if (xf86SetBoolOption(pInfo->options, "InvX", FALSE)) { pMse->invX = -1; } else pMse->invX = 1; if (xf86SetBoolOption(pInfo->options, "InvY", FALSE)) { pMse->invY = -1; } else pMse->invY = 1; pMse->angleOffset = xf86SetIntOption(pInfo->options, "AngleOffset", 0); if (pMse->pDragLock) free(pMse->pDragLock); pMse->pDragLock = NULL; s = xf86SetStrOption(pInfo->options, "DragLockButtons", NULL); if (s) { int lock; /* lock button */ int target; /* target button */ int lockM,targetM; /* bitmasks for drag lock, target */ int j; /* indexes */ char *s1; /* parse input string */ DragLockPtr pLock; pLock = pMse->pDragLock = calloc(1, sizeof(DragLockRec)); /* init code */ /* initial string to be taken apart */ s1 = s; /* keep getting numbers which are buttons */ while ((s1 != NULL) && (lock = strtol(s1, &s1, 10)) != 0) { /* check sanity for a button */ if ((lock < 0) || (lock > MSE_MAXBUTTONS)) { xf86Msg(X_WARNING, "DragLock: Invalid button number = %d\n", lock); break; }; /* turn into a button mask */ lockM = 1 << (lock - 1); /* try to get drag lock button */ if ((s1 == NULL) || ((target=strtol(s1, &s1, 10)) == 0)) { /*if no target, must be a master drag lock button */ /* save master drag lock mask */ pLock->masterLockM = lockM; xf86Msg(X_CONFIG, "DragLock button %d is master drag lock", lock); } else { /* have target button number*/ /* check target button number for sanity */ if ((target < 0) || (target > MSE_MAXBUTTONS)) { xf86Msg(X_WARNING, "DragLock: Invalid button number for target=%d\n", target); break; } /* target button mask */ targetM = 1 << (target - 1); xf86Msg(X_CONFIG, "DragLock: button %d is drag lock for button %d\n", lock,target); lock--; /* initialize table that maps drag lock mask to target mask */ pLock->nib_table[lock / NIB_BITS][1 << (lock % NIB_BITS)] = targetM; /* add new drag lock to mask of drag locks */ pLock->lockButtonsM |= lockM; } } /* * fill out rest of map that maps sets of drag lock buttons * to sets of target buttons, in the form of masks */ /* for each nibble */ for (i = 0; i < NIB_COUNT; i++) { /* for each possible set of bits for that nibble */ for (j = 0; j < NIB_SIZE; j++) { int ff, fM, otherbits; /* get first bit set in j*/ ff = ffs(j) - 1; /* if 0 bits set nothing to do */ if (ff >= 0) { /* form mask for fist bit set */ fM = 1 << ff; /* mask off first bit set to get remaining bits set*/ otherbits = j & ~fM; /* * if otherbits =0 then only 1 bit set * so j=fM * nib_table[i][fM] already calculated if fM has * only 1 bit set. * nib_table[i][j] has already been filled in * by previous loop. otherwise * otherbits < j so nibtable[i][otherbits] * has already been calculated. */ if (otherbits) pLock->nib_table[i][j] = pLock->nib_table[i][fM] | pLock->nib_table[i][otherbits]; } } } free(s); } s = xf86SetStrOption(pInfo->options, "ZAxisMapping", "4 5"); if (s) { int b1 = 0, b2 = 0, b3 = 0, b4 = 0; char *msg = NULL; pMse->negativeZ = pMse->positiveZ = MSE_NOAXISMAP; pMse->negativeW = pMse->positiveW = MSE_NOAXISMAP; if (!xf86NameCmp(s, "x")) { pMse->negativeZ = pMse->positiveZ = MSE_MAPTOX; msg = xstrdup("X axis"); } else if (!xf86NameCmp(s, "y")) { pMse->negativeZ = pMse->positiveZ = MSE_MAPTOY; msg = xstrdup("Y axis"); } else if (sscanf(s, "%d %d %d %d", &b1, &b2, &b3, &b4) >= 2 && b1 > 0 && b1 <= MSE_MAXBUTTONS && b2 > 0 && b2 <= MSE_MAXBUTTONS) { msg = xstrdup("buttons XX and YY"); if (msg) sprintf(msg, "buttons %d and %d", b1, b2); pMse->negativeZ = 1 << (b1-1); pMse->positiveZ = 1 << (b2-1); if (b3 > 0 && b3 <= MSE_MAXBUTTONS && b4 > 0 && b4 <= MSE_MAXBUTTONS) { if (msg) free(msg); msg = xstrdup("buttons XX, YY, ZZ and WW"); if (msg) sprintf(msg, "buttons %d, %d, %d and %d", b1, b2, b3, b4); pMse->negativeW = 1 << (b3-1); pMse->positiveW = 1 << (b4-1); } if (b1 > pMse->buttons) pMse->buttons = b1; if (b2 > pMse->buttons) pMse->buttons = b2; if (b3 > pMse->buttons) pMse->buttons = b3; if (b4 > pMse->buttons) pMse->buttons = b4; } if (msg) { xf86Msg(X_CONFIG, "%s: ZAxisMapping: %s\n", pInfo->name, msg); free(msg); } else { xf86Msg(X_WARNING, "%s: Invalid ZAxisMapping value: \"%s\"\n", pInfo->name, s); } free(s); } if (xf86SetBoolOption(pInfo->options, "EmulateWheel", FALSE)) { Bool yFromConfig = FALSE; int wheelButton; pMse->emulateWheel = TRUE; wheelButton = xf86SetIntOption(pInfo->options, "EmulateWheelButton", 4); if (wheelButton < 0 || wheelButton > MSE_MAXBUTTONS) { xf86Msg(X_WARNING, "%s: Invalid EmulateWheelButton value: %d\n", pInfo->name, wheelButton); wheelButton = 4; } pMse->wheelButton = wheelButton; pMse->wheelInertia = xf86SetIntOption(pInfo->options, "EmulateWheelInertia", 10); if (pMse->wheelInertia <= 0) { xf86Msg(X_WARNING, "%s: Invalid EmulateWheelInertia value: %d\n", pInfo->name, pMse->wheelInertia); pMse->wheelInertia = 10; } pMse->wheelButtonTimeout = xf86SetIntOption(pInfo->options, "EmulateWheelTimeout", 200); if (pMse->wheelButtonTimeout <= 0) { xf86Msg(X_WARNING, "%s: Invalid EmulateWheelTimeout value: %d\n", pInfo->name, pMse->wheelButtonTimeout); pMse->wheelButtonTimeout = 200; } pMse->negativeX = MSE_NOAXISMAP; pMse->positiveX = MSE_NOAXISMAP; s = xf86SetStrOption(pInfo->options, "XAxisMapping", NULL); if (s) { int b1 = 0, b2 = 0; char *msg = NULL; if ((sscanf(s, "%d %d", &b1, &b2) == 2) && b1 > 0 && b1 <= MSE_MAXBUTTONS && b2 > 0 && b2 <= MSE_MAXBUTTONS) { msg = xstrdup("buttons XX and YY"); if (msg) sprintf(msg, "buttons %d and %d", b1, b2); pMse->negativeX = b1; pMse->positiveX = b2; if (b1 > pMse->buttons) pMse->buttons = b1; if (b2 > pMse->buttons) pMse->buttons = b2; } else { xf86Msg(X_WARNING, "%s: Invalid XAxisMapping value: \"%s\"\n", pInfo->name, s); } if (msg) { xf86Msg(X_CONFIG, "%s: XAxisMapping: %s\n", pInfo->name, msg); free(msg); } free(s); } s = xf86SetStrOption(pInfo->options, "YAxisMapping", NULL); if (s) { int b1 = 0, b2 = 0; char *msg = NULL; if ((sscanf(s, "%d %d", &b1, &b2) == 2) && b1 > 0 && b1 <= MSE_MAXBUTTONS && b2 > 0 && b2 <= MSE_MAXBUTTONS) { msg = xstrdup("buttons XX and YY"); if (msg) sprintf(msg, "buttons %d and %d", b1, b2); pMse->negativeY = b1; pMse->positiveY = b2; if (b1 > pMse->buttons) pMse->buttons = b1; if (b2 > pMse->buttons) pMse->buttons = b2; yFromConfig = TRUE; } else { xf86Msg(X_WARNING, "%s: Invalid YAxisMapping value: \"%s\"\n", pInfo->name, s); } if (msg) { xf86Msg(X_CONFIG, "%s: YAxisMapping: %s\n", pInfo->name, msg); free(msg); } free(s); } if (!yFromConfig) { pMse->negativeY = 4; pMse->positiveY = 5; if (pMse->negativeY > pMse->buttons) pMse->buttons = pMse->negativeY; if (pMse->positiveY > pMse->buttons) pMse->buttons = pMse->positiveY; xf86Msg(X_DEFAULT, "%s: YAxisMapping: buttons %d and %d\n", pInfo->name, pMse->negativeY, pMse->positiveY); } xf86Msg(X_CONFIG, "%s: EmulateWheel, EmulateWheelButton: %d, " "EmulateWheelInertia: %d, " "EmulateWheelTimeout: %d\n", pInfo->name, wheelButton, pMse->wheelInertia, pMse->wheelButtonTimeout); } s = xf86SetStrOption(pInfo->options, "ButtonMapping", NULL); if (s) { int b, n = 0; char *s1 = s; /* keep getting numbers which are buttons */ while (s1 && n < MSE_MAXBUTTONS && (b = strtol(s1, &s1, 10)) != 0) { /* check sanity for a button */ if (b < 0 || b > MSE_MAXBUTTONS) { xf86Msg(X_WARNING, "ButtonMapping: Invalid button number = %d\n", b); break; }; pMse->buttonMap[n++] = 1 << (b-1); if (b > pMse->buttons) pMse->buttons = b; } free(s); } /* get maximum of mapped buttons */ for (i = pMse->buttons-1; i >= 0; i--) { int f = ffs (pMse->buttonMap[i]); if (f > pMse->buttons) pMse->buttons = f; } if (origButtons != pMse->buttons) buttons_from = X_CONFIG; xf86Msg(buttons_from, "%s: Buttons: %d\n", pInfo->name, pMse->buttons); pMse->doubleClickSourceButtonMask = 0; pMse->doubleClickTargetButtonMask = 0; pMse->doubleClickTargetButton = 0; s = xf86SetStrOption(pInfo->options, "DoubleClickButtons", NULL); if (s) { int b1 = 0, b2 = 0; char *msg = NULL; if ((sscanf(s, "%d %d", &b1, &b2) == 2) && (b1 > 0) && (b1 <= MSE_MAXBUTTONS) && (b2 > 0) && (b2 <= MSE_MAXBUTTONS)) { msg = xstrdup("buttons XX and YY"); if (msg) sprintf(msg, "buttons %d and %d", b1, b2); pMse->doubleClickTargetButton = b1; pMse->doubleClickTargetButtonMask = 1 << (b1 - 1); pMse->doubleClickSourceButtonMask = 1 << (b2 - 1); if (b1 > pMse->buttons) pMse->buttons = b1; if (b2 > pMse->buttons) pMse->buttons = b2; } else { xf86Msg(X_WARNING, "%s: Invalid DoubleClickButtons value: \"%s\"\n", pInfo->name, s); } if (msg) { xf86Msg(X_CONFIG, "%s: DoubleClickButtons: %s\n", pInfo->name, msg); free(msg); } free(s); } } /* * map bits corresponding to lock buttons. * for each bit for a lock button, * turn on bit corresponding to button button that the lock * button services. */ static int lock2targetMap(DragLockPtr pLock, int lockMask) { int result,i; result = 0; /* * for each nibble group of bits, use * map for that group to get corresponding * bits, turn them on. * if 4 or less buttons only first map will * need to be used. */ for (i = 0; (i < NIB_COUNT) && lockMask; i++) { result |= pLock->nib_table[i][lockMask& NIB_MASK]; lockMask &= ~NIB_MASK; lockMask >>= NIB_BITS; } return result; } static void MouseHWOptions(InputInfoPtr pInfo) { MouseDevPtr pMse = pInfo->private; mousePrivPtr mPriv = (mousePrivPtr)pMse->mousePriv; if (mPriv == NULL) return; if ((mPriv->soft = xf86SetBoolOption(pInfo->options, "AutoSoft", FALSE))) { xf86Msg(X_CONFIG, "Don't initialize mouse when auto-probing\n"); } pMse->sampleRate = xf86SetIntOption(pInfo->options, "SampleRate", 0); pMse->resolution = xf86SetIntOption(pInfo->options, "Resolution", 0); mPriv->sensitivity = xf86SetRealOption(pInfo->options, "Sensitivity", 1.0); } static void MouseSerialOptions(InputInfoPtr pInfo) { MouseDevPtr pMse = pInfo->private; pMse->baudRate = xf86SetIntOption(pInfo->options, "BaudRate", 0); } static MouseProtocolID ProtocolNameToID(const char *name) { int i; for (i = 0; mouseProtocols[i].name; i++) if (xf86NameCmp(name, mouseProtocols[i].name) == 0) return mouseProtocols[i].id; return PROT_UNKNOWN; } static const char * ProtocolIDToName(MouseProtocolID id) { int i; switch (id) { case PROT_UNKNOWN: return "Unknown"; break; case PROT_UNSUP: return "Unsupported"; break; default: for (i = 0; mouseProtocols[i].name; i++) if (id == mouseProtocols[i].id) return mouseProtocols[i].name; return "Invalid"; } } static int ProtocolIDToClass(MouseProtocolID id) { int i; switch (id) { case PROT_UNKNOWN: case PROT_UNSUP: return MSE_NONE; break; default: for (i = 0; mouseProtocols[i].name; i++) if (id == mouseProtocols[i].id) return mouseProtocols[i].class; return MSE_NONE; } } static MouseProtocolPtr GetProtocol(MouseProtocolID id) { int i; switch (id) { case PROT_UNKNOWN: case PROT_UNSUP: return NULL; break; default: for (i = 0; mouseProtocols[i].name; i++) if (id == mouseProtocols[i].id) { return &mouseProtocols[i]; } return NULL; } } static OSMouseInfoPtr osInfo = NULL; static Bool InitProtocols(void) { int classes; int i; const char *osname = NULL; if (osInfo) return TRUE; osInfo = OSMouseInit(0); if (!osInfo) return FALSE; if (!osInfo->SupportedInterfaces) return FALSE; classes = osInfo->SupportedInterfaces(); if (!classes) return FALSE; /* Mark unsupported interface classes. */ for (i = 0; mouseProtocols[i].name; i++) if (!(mouseProtocols[i].class & classes)) mouseProtocols[i].id = PROT_UNSUP; for (i = 0; mouseProtocols[i].name; i++) if (mouseProtocols[i].class & MSE_MISC) if (!osInfo->CheckProtocol || !osInfo->CheckProtocol(mouseProtocols[i].name)) mouseProtocols[i].id = PROT_UNSUP; /* NetBSD uses PROT_BM for "PS/2". */ xf86GetOS(&osname, NULL, NULL, NULL); if (osname && xf86NameCmp(osname, "netbsd") == 0) for (i = 0; mouseProtocols[i].name; i++) if (mouseProtocols[i].id == PROT_PS2) mouseProtocols[i].id = PROT_BM; return TRUE; } static const char* MouseFindDevice(InputInfoPtr pInfo, const char* protocol) { const char *device; if (!osInfo->FindDevice) return NULL; xf86Msg(X_WARNING, "%s: No Device specified, looking for one...\n", pInfo->name); device = osInfo->FindDevice(pInfo, protocol, 0); if (!device) xf86Msg(X_ERROR, "%s: Cannot find which device to use.\n", pInfo->name); else xf86Msg(X_PROBED, "%s: Device: \"%s\"\n", pInfo->name, device); return device; } static const char* MousePickProtocol(InputInfoPtr pInfo, const char* device, const char *protocol, MouseProtocolID *protocolID_out) { MouseProtocolID protocolID = *protocolID_out; protocolID = ProtocolNameToID(protocol); if (protocolID == PROT_AUTO) { const char *osProt; if (osInfo->SetupAuto && (osProt = osInfo->SetupAuto(pInfo,NULL))) { MouseProtocolID id = ProtocolNameToID(osProt); if (id == PROT_UNKNOWN || id == PROT_UNSUP) { protocolID = id; protocol = osProt; } } } switch (protocolID) { case PROT_WSMOUSE: case PROT_VUID: if (osInfo->PreInit) osInfo->PreInit(pInfo, protocol, 0); break; case PROT_UNKNOWN: /* Check for a builtin OS-specific protocol, * and call its PreInit. */ if (osInfo->CheckProtocol && osInfo->CheckProtocol(protocol)) { if (!device) MouseFindDevice(pInfo, protocol); if (osInfo->PreInit) { osInfo->PreInit(pInfo, protocol, 0); } break; } xf86Msg(X_ERROR, "%s: Unknown protocol \"%s\"\n", pInfo->name, protocol); break; case PROT_UNSUP: xf86Msg(X_ERROR, "%s: Protocol \"%s\" is not supported on this " "platform\n", pInfo->name, protocol); break; default: break; } *protocolID_out = protocolID; return protocol; } #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 static int NewMousePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); static InputInfoPtr MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags) { InputInfoPtr pInfo; if (!(pInfo = xf86AllocateInput(drv, 0))) return NULL; pInfo->name = dev->identifier; pInfo->flags = XI86_SEND_DRAG_EVENTS; pInfo->conf_idev = dev; pInfo->close_proc = NULL; pInfo->private_flags = 0; pInfo->always_core_feedback = NULL; COLLECT_INPUT_OPTIONS(pInfo, NULL); if (NewMousePreInit(drv, pInfo, flags) == Success) { /* Check if SendDragEvents has been disabled. */ if (!xf86SetBoolOption(dev->commonOptions, "SendDragEvents", TRUE)) pInfo->flags &= ~XI86_SEND_DRAG_EVENTS; pInfo->flags |= XI86_CONFIGURED; return pInfo; } xf86DeleteInput(pInfo, 0); return NULL; } static int NewMousePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) #else static int MousePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) #endif { MouseDevPtr pMse; mousePrivPtr mPriv; MessageType protocolFrom = X_DEFAULT; const char *protocol; const char *device; MouseProtocolID protocolID; MouseProtocolPtr pProto; int i; int rc = Success; if (!InitProtocols()) return BadAlloc; /* Initialise the InputInfoRec. */ pInfo->type_name = XI_MOUSE; pInfo->device_control = MouseProc; pInfo->read_input = MouseReadInput; pInfo->control_proc = NULL; pInfo->switch_mode = NULL; pInfo->fd = -1; pInfo->dev = NULL; /* Allocate the MouseDevRec and initialise it. */ if (!(pMse = calloc(sizeof(MouseDevRec), 1))) { rc = BadAlloc; goto out; } pInfo->private = pMse; pMse->Ctrl = MouseCtrl; pMse->PostEvent = MousePostEvent; pMse->CommonOptions = MouseCommonOptions; /* Find the protocol type. */ protocol = xf86SetStrOption(pInfo->options, "Protocol", NULL); if (protocol) { protocolFrom = X_CONFIG; } else if (osInfo->DefaultProtocol) { protocol = osInfo->DefaultProtocol(); protocolFrom = X_DEFAULT; } if (!protocol) { xf86Msg(X_ERROR, "%s: No Protocol specified\n", pInfo->name); rc = BadValue; goto out; } device = xf86SetStrOption(pInfo->options, "Device", NULL); /* Default Mapping: 1 2 3 8 9 10 11 ... */ for (i = 0; i < MSE_MAXBUTTONS; i++) pMse->buttonMap[i] = 1 << (i > 2 && i < MSE_MAXBUTTONS-4 ? i+4 : i); protocol = MousePickProtocol(pInfo, device, protocol, &protocolID); if (!device) MouseFindDevice(pInfo, protocol); xf86Msg(protocolFrom, "%s: Protocol: \"%s\"\n", pInfo->name, protocol); if (protocolID == PROT_UNKNOWN) goto out; if (!(pProto = GetProtocol(protocolID))) { rc = BadValue; goto out; } pMse->protocolID = protocolID; pMse->oldProtocolID = protocolID; /* hack */ pMse->autoProbe = FALSE; /* Collect the options, and process the common options. */ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 /* need some special handling here. xf86CollectInputOptions will reset * pInfo->options if the second argument is not-null. To re-merge the * previously set arguments, pass the original pInfo->options in. */ xf86CollectInputOptions(pInfo, pProto->defaults, pInfo->options); #else COLLECT_INPUT_OPTIONS(pInfo, pProto->defaults); #endif xf86ProcessCommonOptions(pInfo, pInfo->options); /* Check if the device can be opened. */ pInfo->fd = xf86OpenSerial(pInfo->options); if (pInfo->fd == -1) { if (xf86GetAllowMouseOpenFail()) xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name); else { xf86Msg(X_ERROR, "%s: cannot open input device\n", pInfo->name); if (pMse->mousePriv) free(pMse->mousePriv); free(pMse); pInfo->private = NULL; rc = BadValue; goto out; } } xf86CloseSerial(pInfo->fd); pInfo->fd = -1; if (!(mPriv = (pointer) calloc(sizeof(mousePrivRec), 1))) { rc = BadAlloc; goto out; } pMse->mousePriv = mPriv; pMse->CommonOptions(pInfo); pMse->checkMovements = checkForErraticMovements; pMse->autoProbeMouse = autoProbeMouse; pMse->collectData = collectData; pMse->dataGood = autoGood; MouseHWOptions(pInfo); MouseSerialOptions(pInfo); out: return rc; } static void MouseInitButtonLabels(Atom *btn_labels) { int i; Atom unknown_btn; btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); unknown_btn = XIGetKnownProperty(BTN_LABEL_PROP_BTN_UNKNOWN); for (i = 7; i < MSE_MAXBUTTONS; i++) btn_labels[i] = unknown_btn; } static int MouseSetProperty(DeviceIntPtr device, Atom atom, XIPropertyValuePtr val, BOOL checkonly) { InputInfoPtr pInfo = device->public.devicePrivate; MouseDevPtr pMse = pInfo->private; if (atom == prop_mbemu) { if (val->format != 8 || val->size != 1 || val->type != XA_INTEGER) return BadMatch; if (!checkonly) Emulate3ButtonsSetEnabled(pInfo, *((BOOL*)val->data)); } else if (atom == prop_mbtimeout) { if (val->format != 32 || val->size != 1 || val->type != XA_INTEGER) return BadMatch; if (!checkonly) pMse->emulate3Timeout = *((CARD32*)val->data); } return Success; } static void MouseInitProperties(DeviceIntPtr device) { InputInfoPtr pInfo = device->public.devicePrivate; MouseDevPtr pMse = pInfo->private; int rc; #ifdef XI_PROP_DEVICE_NODE const char *device_node = xf86CheckStrOption(pInfo->options, "Device", NULL); if (device_node) { Atom prop_device = MakeAtom(XI_PROP_DEVICE_NODE, strlen(XI_PROP_DEVICE_NODE), TRUE); XIChangeDeviceProperty(device, prop_device, XA_STRING, 8, PropModeReplace, strlen(device_node), device_node, FALSE); } #endif /* XI_PROP_DEVICE_NODE */ /* Button labels */ if (pMse->buttons > 0) { Atom prop_btn_label = XIGetKnownProperty(BTN_LABEL_PROP); if (prop_btn_label) { Atom btn_labels[MSE_MAXBUTTONS]; MouseInitButtonLabels(btn_labels); XIChangeDeviceProperty(device, prop_btn_label, XA_ATOM, 32, PropModeReplace, pMse->buttons, btn_labels, FALSE); XISetDevicePropertyDeletable(device, prop_btn_label, FALSE); } } /* Middle button emulation - which this driver calls 3rd button emulation, * but evdev's properties considers that to be simulating right button * clicks from a one button mouse, which this driver does not currently * support, so we use this name for better consistency. */ prop_mbemu = MakeAtom(MOUSE_PROP_MIDBUTTON, strlen(MOUSE_PROP_MIDBUTTON), TRUE); rc = XIChangeDeviceProperty(device, prop_mbemu, XA_INTEGER, 8, PropModeReplace, 1, &pMse->emulate3Buttons, FALSE); if (rc != Success) return; XISetDevicePropertyDeletable(device, prop_mbemu, FALSE); prop_mbtimeout = MakeAtom(MOUSE_PROP_MIDBUTTON_TIMEOUT, strlen(MOUSE_PROP_MIDBUTTON_TIMEOUT), TRUE); rc = XIChangeDeviceProperty(device, prop_mbtimeout, XA_INTEGER, 32, PropModeReplace, 1, &pMse->emulate3Timeout, FALSE); if (rc != Success) return; XISetDevicePropertyDeletable(device, prop_mbtimeout, FALSE); XIRegisterPropertyHandler(device, MouseSetProperty, NULL, NULL); } static void MouseReadInput(InputInfoPtr pInfo) { MouseDevPtr pMse; int j, buttons, dx, dy, dz, dw, baddata; int pBufP; int c; unsigned char *pBuf, u; pMse = pInfo->private; pBufP = pMse->protoBufTail; pBuf = pMse->protoBuf; if (pInfo->fd == -1) return; /* * Set blocking to -1 on the first call because we know there is data to * read. Xisb automatically clears it after one successful read so that * succeeding reads are preceeded by a select with a 0 timeout to prevent * read from blocking indefinitely. */ XisbBlockDuration(pMse->buffer, -1); while ((c = XisbRead(pMse->buffer)) >= 0) { u = (unsigned char)c; #if defined (EXTMOUSEDEBUG) || defined (MOUSEDATADEBUG) LogMessageVerbSigSafe(X_INFO, -1, "mouse byte: %x\n",u); #endif /* if we do autoprobing collect the data */ if (pMse->collectData && pMse->autoProbe) if (pMse->collectData(pMse,u)) continue; #ifdef SUPPORT_MOUSE_RESET if (mouseReset(pInfo,u)) { pBufP = 0; continue; } #endif if (pBufP >= pMse->protoPara[4]) { /* * Buffer contains a full packet, which has already been processed: * Empty the buffer and check for optional 4th byte, which will be * processed directly, without being put into the buffer first. */ pBufP = 0; if ((u & pMse->protoPara[0]) != pMse->protoPara[1] && (u & pMse->protoPara[5]) == pMse->protoPara[6]) { /* * Hack for Logitech MouseMan Mouse - Middle button * * Unfortunately this mouse has variable length packets: the * standard Microsoft 3 byte packet plus an optional 4th byte * whenever the middle button status changes. * * We have already processed the standard packet with the * movement and button info. Now post an event message with * the old status of the left and right buttons and the * updated middle button. */ /* * Even worse, different MouseMen and TrackMen differ in the * 4th byte: some will send 0x00/0x20, others 0x01/0x21, or * even 0x02/0x22, so I have to strip off the lower bits. * [CHRIS-211092] * * [JCH-96/01/21] * HACK for ALPS "fourth button". (It's bit 0x10 of the * "fourth byte" and it is activated by tapping the glidepad * with the finger! 8^) We map it to bit bit3, and the * reverse map in xf86Events just has to be extended so that * it is identified as Button 4. The lower half of the * reverse-map may remain unchanged. */ /* * [KAZU-030897] * Receive the fourth byte only when preceeding three bytes * have been detected (pBufP >= pMse->protoPara[4]). In the * previous versions, the test was pBufP == 0; we may have * mistakingly received a byte even if we didn't see anything * preceeding the byte. */ #ifdef EXTMOUSEDEBUG LogMessageVerbSigSafe(X_INFO, -1, "mouse 4th byte %x\n",u); #endif dx = dy = dz = dw = 0; buttons = 0; switch (pMse->protocolID) { /* * [KAZU-221197] * IntelliMouse, NetMouse (including NetMouse Pro) and Mie * Mouse always send the fourth byte, whereas the fourth byte * is optional for GlidePoint and ThinkingMouse. The fourth * byte is also optional for MouseMan+ and FirstMouse+ in * their native mode. It is always sent if they are in the * IntelliMouse compatible mode. */ case PROT_IMSERIAL: /* IntelliMouse, NetMouse, Mie Mouse, MouseMan+ */ dz = (u & 0x08) ? (u & 0x0f) - 16 : (u & 0x0f); if ((dz >= 7) || (dz <= -7)) dz = 0; buttons |= ((int)(u & 0x10) >> 3) | ((int)(u & 0x20) >> 2) | (pMse->lastButtons & 0x05); break; case PROT_GLIDE: case PROT_THINKING: buttons |= ((int)(u & 0x10) >> 1); /* fall through */ default: buttons |= ((int)(u & 0x20) >> 4) | (pMse->lastButtons & 0x05); break; } goto post_event; } } /* End of packet buffer flush and 4th byte hack. */ /* * Append next byte to buffer (which is empty or contains an * incomplete packet); iterate if packet (still) not complete. */ pBuf[pBufP++] = u; if (pBufP != pMse->protoPara[4]) continue; #ifdef EXTMOUSEDEBUG2 { int i; LogMessageVerbSigSafe(X_INFO, -1, "received %d bytes",pBufP); for ( i=0; i < pBufP; i++) LogMessageVerbSigSafe(X_INFO, -1, " %x",pBuf[i]); LogMessageVerbSigSafe(X_INFO, -1, "\n"); } #endif /* * Hack for resyncing: We check here for a package that is: * a) illegal (detected by wrong data-package header) * b) invalid (0x80 == -128 and that might be wrong for MouseSystems) * c) bad header-package * * NOTE: b) is a violation of the MouseSystems-Protocol, since values * of -128 are allowed, but since they are very seldom we can * easily use them as package-header with no button pressed. * NOTE/2: On a PS/2 mouse any byte is valid as a data byte. * Furthermore, 0x80 is not valid as a header byte. For a PS/2 * mouse we skip checking data bytes. For resyncing a PS/2 * mouse we require the two most significant bits in the header * byte to be 0. These are the overflow bits, and in case of * an overflow we actually lose sync. Overflows are very rare, * however, and we quickly gain sync again after an overflow * condition. This is the best we can do. (Actually, we could * use bit 0x08 in the header byte for resyncing, since that * bit is supposed to be always on, but nobody told Microsoft...) */ /* * [KAZU,OYVIND-120398] * The above hack is wrong! Because of b) above, we shall see * erroneous mouse events so often when the MouseSystem mouse is * moved quickly. As for the PS/2 and its variants, we don't need * to treat them as special cases, because protoPara[2] and * protoPara[3] are both 0x00 for them, thus, any data bytes will * never be discarded. 0x80 is rejected for MMSeries, Logitech * and MMHittab protocols, because protoPara[2] and protoPara[3] * are 0x80 and 0x00 respectively. The other protocols are 7-bit * protocols; there is no use checking 0x80. * * All in all we should check the condition a) only. */ /* * [OYVIND-120498] * Check packet for valid data: * If driver is in sync with datastream, the packet is considered * bad if any byte (header and/or data) contains an invalid value. * * If packet is bad, we discard the first byte and shift the buffer. * Next iteration will then check the new situation for validity. * * If flag MF_SAFE is set in proto[7] and the driver * is out of sync, the packet is also considered bad if * any of the data bytes contains a valid header byte value. * This situation could occur if the buffer contains * the tail of one packet and the header of the next. * * Note: The driver starts in out-of-sync mode (pMse->inSync = 0). */ baddata = 0; /* All databytes must be valid. */ for (j = 1; j < pBufP; j++ ) if ((pBuf[j] & pMse->protoPara[2]) != pMse->protoPara[3]) baddata = 1; /* If out of sync, don't mistake a header byte for data. */ if ((pMse->protoPara[7] & MPF_SAFE) && !pMse->inSync) for (j = 1; j < pBufP; j++ ) if ((pBuf[j] & pMse->protoPara[0]) == pMse->protoPara[1]) baddata = 1; /* Accept or reject the packet ? */ if ((pBuf[0] & pMse->protoPara[0]) != pMse->protoPara[1] || baddata) { if (pMse->inSync) { #ifdef EXTMOUSEDEBUG LogMessageVerbSigSafe(X_INFO, -1, "mouse driver lost sync\n"); #endif } #ifdef EXTMOUSEDEBUG LogMessageVerbSigSafe(X_INFO, -1, "skipping byte %x\n",*pBuf); #endif /* Tell auto probe that we are out of sync */ if (pMse->autoProbeMouse && pMse->autoProbe) pMse->autoProbeMouse(pInfo, FALSE, pMse->inSync); pMse->protoBufTail = --pBufP; for (j = 0; j < pBufP; j++) pBuf[j] = pBuf[j+1]; pMse->inSync = 0; continue; } /* Tell auto probe that we were successful */ if (pMse->autoProbeMouse && pMse->autoProbe) pMse->autoProbeMouse(pInfo, TRUE, FALSE); if (!pMse->inSync) { #ifdef EXTMOUSEDEBUG LogMessageVerbSigSafe(X_INFO, -1, "mouse driver back in sync\n"); #endif pMse->inSync = 1; } if (!pMse->dataGood(pMse)) continue; /* * Packet complete and verified, now process it ... */ REDO_INTERPRET: dz = dw = 0; switch (pMse->protocolID) { case PROT_LOGIMAN: /* MouseMan / TrackMan [CHRIS-211092] */ case PROT_MS: /* Microsoft */ if (pMse->chordMiddle) buttons = (((int) pBuf[0] & 0x30) == 0x30) ? 2 : ((int)(pBuf[0] & 0x20) >> 3) | ((int)(pBuf[0] & 0x10) >> 4); else buttons = (pMse->lastButtons & 2) | ((int)(pBuf[0] & 0x20) >> 3) | ((int)(pBuf[0] & 0x10) >> 4); dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F)); dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F)); break; case PROT_GLIDE: /* ALPS GlidePoint */ case PROT_THINKING: /* ThinkingMouse */ case PROT_IMSERIAL: /* IntelliMouse, NetMouse, Mie Mouse, MouseMan+ */ buttons = (pMse->lastButtons & (8 + 2)) | ((int)(pBuf[0] & 0x20) >> 3) | ((int)(pBuf[0] & 0x10) >> 4); dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F)); dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F)); break; case PROT_MSC: /* Mouse Systems Corp */ buttons = (~pBuf[0]) & 0x07; dx = (signed char)(pBuf[1]) + (char)(pBuf[3]); dy = - ((signed char)(pBuf[2]) + (char)(pBuf[4])); break; case PROT_MMHIT: /* MM_HitTablet */ buttons = pBuf[0] & 0x07; if (buttons != 0) buttons = 1 << (buttons - 1); dx = (pBuf[0] & 0x10) ? pBuf[1] : - pBuf[1]; dy = (pBuf[0] & 0x08) ? - pBuf[2] : pBuf[2]; break; case PROT_ACECAD: /* ACECAD */ /* ACECAD is almost exactly like MM but the buttons are different */ buttons = (pBuf[0] & 0x02) | ((pBuf[0] & 0x04) >> 2) | ((pBuf[0] & 1) << 2); dx = (pBuf[0] & 0x10) ? pBuf[1] : - pBuf[1]; dy = (pBuf[0] & 0x08) ? - pBuf[2] : pBuf[2]; break; case PROT_MM: /* MM Series */ case PROT_LOGI: /* Logitech Mice */ buttons = pBuf[0] & 0x07; dx = (pBuf[0] & 0x10) ? pBuf[1] : - pBuf[1]; dy = (pBuf[0] & 0x08) ? - pBuf[2] : pBuf[2]; break; case PROT_BM: /* BusMouse */ buttons = (~pBuf[0]) & 0x07; dx = (signed char)pBuf[1]; dy = - (signed char)pBuf[2]; break; case PROT_PS2: /* PS/2 mouse */ case PROT_GENPS2: /* generic PS/2 mouse */ buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */ (pBuf[0] & 0x02) >> 1 | /* Right */ (pBuf[0] & 0x01) << 2; /* Left */ dx = (pBuf[0] & 0x10) ? (int)pBuf[1]-256 : (int)pBuf[1]; dy = (pBuf[0] & 0x20) ? -((int)pBuf[2]-256) : -(int)pBuf[2]; break; /* PS/2 mouse variants */ case PROT_IMPS2: /* IntelliMouse PS/2 */ case PROT_NETPS2: /* NetMouse PS/2 */ buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */ (pBuf[0] & 0x02) >> 1 | /* Right */ (pBuf[0] & 0x01) << 2 | /* Left */ (pBuf[0] & 0x40) >> 3 | /* button 4 */ (pBuf[0] & 0x80) >> 3; /* button 5 */ dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1]; dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2]; /* * The next cast must be 'signed char' for platforms (like PPC) * where char defaults to unsigned. */ dz = (signed char)(pBuf[3] | ((pBuf[3] & 0x08) ? 0xf8 : 0)); if ((pBuf[3] & 0xf8) && ((pBuf[3] & 0xf8) != 0xf8)) { if (pMse->autoProbe) { SetMouseProto(pMse, PROT_EXPPS2); xf86Msg(X_INFO, "Mouse autoprobe: Changing protocol to %s\n", pMse->protocol); goto REDO_INTERPRET; } else dz = 0; } break; case PROT_EXPPS2: /* IntelliMouse Explorer PS/2 */ if (pMse->autoProbe && (pBuf[3] & 0xC0)) { SetMouseProto(pMse, PROT_IMPS2); xf86Msg(X_INFO,"Mouse autoprobe: Changing protocol to %s\n", pMse->protocol); goto REDO_INTERPRET; } buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */ (pBuf[0] & 0x02) >> 1 | /* Right */ (pBuf[0] & 0x01) << 2 | /* Left */ (pBuf[3] & 0x10) >> 1 | /* button 4 */ (pBuf[3] & 0x20) >> 1; /* button 5 */ dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1]; dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2]; if (pMse->negativeW != MSE_NOAXISMAP) { switch (pBuf[3] & 0x0f) { case 0x00: break; case 0x01: dz = 1; break; case 0x02: dw = 1; break; case 0x0e: dw = -1; break; case 0x0f: dz = -1; break; default: xf86Msg(X_INFO, "Mouse autoprobe: Disabling secondary wheel\n"); pMse->negativeW = pMse->positiveW = MSE_NOAXISMAP; } } if (pMse->negativeW == MSE_NOAXISMAP) dz = (pBuf[3]&0x08) ? (pBuf[3]&0x0f) - 16 : (pBuf[3]&0x0f); break; case PROT_MMPS2: /* MouseMan+ PS/2 */ buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */ (pBuf[0] & 0x02) >> 1 | /* Right */ (pBuf[0] & 0x01) << 2; /* Left */ dx = (pBuf[0] & 0x10) ? pBuf[1] - 256 : pBuf[1]; if (((pBuf[0] & 0x48) == 0x48) && (abs(dx) > 191) && ((((pBuf[2] & 0x03) << 2) | 0x02) == (pBuf[1] & 0x0f))) { /* extended data packet */ switch ((((pBuf[0] & 0x30) >> 2) | ((pBuf[1] & 0x30) >> 4))) { case 1: /* wheel data packet */ buttons |= ((pBuf[2] & 0x10) ? 0x08 : 0) | /* 4th button */ ((pBuf[2] & 0x20) ? 0x10 : 0); /* 5th button */ dx = dy = 0; dz = (pBuf[2] & 0x08) ? (pBuf[2] & 0x0f) - 16 : (pBuf[2] & 0x0f); break; case 2: /* Logitech reserves this packet type */ /* * IBM ScrollPoint uses this packet to encode its * stick movement. */ buttons |= (pMse->lastButtons & ~0x07); dx = dy = 0; dz = (pBuf[2] & 0x80) ? ((pBuf[2] >> 4) & 0x0f) - 16 : ((pBuf[2] >> 4) & 0x0f); dw = (pBuf[2] & 0x08) ? (pBuf[2] & 0x0f) - 16 : (pBuf[2] & 0x0f); break; case 0: /* device type packet - shouldn't happen */ default: buttons |= (pMse->lastButtons & ~0x07); dx = dy = 0; dz = 0; break; } } else { buttons |= (pMse->lastButtons & ~0x07); dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1]; dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2]; } break; case PROT_GLIDEPS2: /* GlidePoint PS/2 */ buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */ (pBuf[0] & 0x02) >> 1 | /* Right */ (pBuf[0] & 0x01) << 2 | /* Left */ ((pBuf[0] & 0x08) ? 0 : 0x08);/* fourth button */ dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1]; dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2]; break; case PROT_NETSCPS2: /* NetScroll PS/2 */ buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */ (pBuf[0] & 0x02) >> 1 | /* Right */ (pBuf[0] & 0x01) << 2 | /* Left */ ((pBuf[3] & 0x02) ? 0x08 : 0) | /* button 4 */ ((pBuf[3] & 0x01) ? 0x10 : 0); /* button 5 */ dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1]; dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2]; dz = (pBuf[3] & 0x10) ? pBuf[4] - 256 : pBuf[4]; break; case PROT_THINKPS2: /* ThinkingMouse PS/2 */ buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */ (pBuf[0] & 0x02) >> 1 | /* Right */ (pBuf[0] & 0x01) << 2 | /* Left */ ((pBuf[0] & 0x08) ? 0x08 : 0);/* fourth button */ pBuf[1] |= (pBuf[0] & 0x40) ? 0x80 : 0x00; dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1]; dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2]; break; case PROT_SYSMOUSE: /* sysmouse */ buttons = (~pBuf[0]) & 0x07; dx = (signed char)(pBuf[1]) + (signed char)(pBuf[3]); dy = - ((signed char)(pBuf[2]) + (signed char)(pBuf[4])); /* FreeBSD sysmouse sends additional data bytes */ if (pMse->protoPara[4] >= 8) { /* * These casts must be 'signed char' for platforms (like PPC) * where char defaults to unsigned. */ dz = ((signed char)(pBuf[5] << 1) + (signed char)(pBuf[6] << 1)) >> 1; buttons |= (int)(~pBuf[7] & 0x7f) << 3; } break; case PROT_VALUMOUSESCROLL: /* Kensington ValuMouseScroll */ buttons = ((int)(pBuf[0] & 0x20) >> 3) | ((int)(pBuf[0] & 0x10) >> 4) | ((int)(pBuf[3] & 0x10) >> 3); dx = (signed char)(((pBuf[0] & 0x03) << 6) | (pBuf[1] & 0x3F)); dy = (signed char)(((pBuf[0] & 0x0C) << 4) | (pBuf[2] & 0x3F)); dz = (pBuf[3] & 0x08) ? ((int)(pBuf[3] & 0x0F) - 0x10) : ((int)(pBuf[3] & 0x0F)); break; default: /* There's a table error */ #ifdef EXTMOUSEDEBUG LogMessageVerbSigSafe(X_INFO, -1, "mouse table error\n"); #endif continue; } #ifdef EXTMOUSEDEBUG LogMessageVerbSigSafe(X_INFO, -1, "packet"); for ( j=0; j < pBufP; j++) LogMessageVerbSigSafe(X_INFO, -1, " %x",pBuf[j]); LogMessageVerbSigSafe(X_INFO, -1, "\n"); #endif post_event: #ifdef EXTMOUSEDEBUG LogMessageVerbSigSafe(X_INFO, -1, "dx=%i dy=%i dz=%i dw=%i buttons=%x\n",dx,dy,dz,dw,buttons); #endif /* When auto-probing check if data makes sense */ if (pMse->checkMovements && pMse->autoProbe) pMse->checkMovements(pInfo,dx,dy); /* post an event */ pMse->PostEvent(pInfo, buttons, dx, dy, dz, dw); /* * We don't reset pBufP here yet, as there may be an additional data * byte in some protocols. See above. */ } pMse->protoBufTail = pBufP; } /* * MouseCtrl -- * Alter the control parameters for the mouse. Note that all * settings are now handled by dix. */ static void MouseCtrl(DeviceIntPtr device, PtrCtrl *ctrl) { /* This function intentionally left blank */ } /* *************************************************************************** * * MouseProc -- * *************************************************************************** */ static int MouseProc(DeviceIntPtr device, int what) { InputInfoPtr pInfo; MouseDevPtr pMse; mousePrivPtr mPriv; unsigned char map[MSE_MAXBUTTONS + 1]; int i; Atom btn_labels[MSE_MAXBUTTONS] = {0}; Atom axes_labels[2] = { 0, 0 }; pInfo = device->public.devicePrivate; pMse = pInfo->private; pMse->device = device; switch (what) { case DEVICE_INIT: device->public.on = FALSE; /* * [KAZU-241097] We don't know exactly how many buttons the * device has, so setup the map with the maximum number. */ for (i = 0; i < MSE_MAXBUTTONS; i++) map[i + 1] = i + 1; MouseInitButtonLabels(btn_labels); axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); InitPointerDeviceStruct((DevicePtr)device, map, min(pMse->buttons, MSE_MAXBUTTONS), btn_labels, pMse->Ctrl, GetMotionHistorySize(), 2, axes_labels ); /* X valuator */ xf86InitValuatorAxisStruct(device, 0, axes_labels[0], -1, -1, 1, 0, 1 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 , Relative #endif ); xf86InitValuatorDefaults(device, 0); /* Y valuator */ xf86InitValuatorAxisStruct(device, 1, axes_labels[1], -1, -1, 1, 0, 1 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 , Relative #endif ); xf86InitValuatorDefaults(device, 1); #ifdef EXTMOUSEDEBUG ErrorF("assigning %p name=%s\n", device, pInfo->name); #endif MouseInitProperties(device); break; case DEVICE_ON: pInfo->fd = xf86OpenSerial(pInfo->options); if (pInfo->fd == -1) xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name); else { if (pMse->xisbscale) pMse->buffer = XisbNew(pInfo->fd, pMse->xisbscale * 4); else pMse->buffer = XisbNew(pInfo->fd, 64); if (!pMse->buffer) { xf86CloseSerial(pInfo->fd); pInfo->fd = -1; } else { if (!SetupMouse(pInfo)) { xf86CloseSerial(pInfo->fd); pInfo->fd = -1; XisbFree(pMse->buffer); pMse->buffer = NULL; } else { mPriv = (mousePrivPtr)pMse->mousePriv; if (mPriv != NULL) { if ( pMse->protocolID != PROT_AUTO) { pMse->inSync = TRUE; /* @@@ */ if (mPriv->soft) mPriv->autoState = AUTOPROBE_GOOD; else mPriv->autoState = AUTOPROBE_H_GOOD; } else { if (mPriv->soft) mPriv->autoState = AUTOPROBE_NOPROTO; else mPriv->autoState = AUTOPROBE_H_NOPROTO; } } xf86FlushInput(pInfo->fd); xf86AddEnabledDevice(pInfo); if (pMse->emulate3Buttons || pMse->emulate3ButtonsSoft) { RegisterBlockAndWakeupHandlers (MouseBlockHandler, MouseWakeupHandler, (pointer) pInfo); } } } } pMse->lastButtons = 0; pMse->lastMappedButtons = 0; pMse->emulateState = 0; pMse->emulate3Pending = FALSE; pMse->wheelButtonExpires = GetTimeInMillis (); device->public.on = TRUE; FlushButtons(pMse); break; case DEVICE_OFF: if (pInfo->fd != -1) { xf86RemoveEnabledDevice(pInfo); if (pMse->buffer) { XisbFree(pMse->buffer); pMse->buffer = NULL; } xf86CloseSerial(pInfo->fd); pInfo->fd = -1; if (pMse->emulate3Buttons || pMse->emulate3ButtonsSoft) { RemoveBlockAndWakeupHandlers (MouseBlockHandler, MouseWakeupHandler, (pointer) pInfo); } } device->public.on = FALSE; break; case DEVICE_CLOSE: free(pMse->mousePriv); pMse->mousePriv = NULL; break; default: return BadValue; } return Success; } /********************************************************************** * * FlushButtons -- reset button states. * **********************************************************************/ static void FlushButtons(MouseDevPtr pMse) { pMse->lastButtons = 0; pMse->lastMappedButtons = 0; } /********************************************************************** * * Emulate3Button support code * **********************************************************************/ /* * Lets create a simple finite-state machine for 3 button emulation: * * We track buttons 1 and 3 (left and right). There are 11 states: * 0 ground - initial state * 1 delayed left - left pressed, waiting for right * 2 delayed right - right pressed, waiting for left * 3 pressed middle - right and left pressed, emulated middle sent * 4 pressed left - left pressed and sent * 5 pressed right - right pressed and sent * 6 released left - left released after emulated middle * 7 released right - right released after emulated middle * 8 repressed left - left pressed after released left * 9 repressed right - right pressed after released right * 10 pressed both - both pressed, not emulating middle * * At each state, we need handlers for the following events * 0: no buttons down * 1: left button down * 2: right button down * 3: both buttons down * 4: emulate3Timeout passed without a button change * Note that button events are not deltas, they are the set of buttons being * pressed now. It's possible (ie, mouse hardware does it) to go from (eg) * left down to right down without anything in between, so all cases must be * handled. * * a handler consists of three values: * 0: action1 * 1: action2 * 2: new emulation state * * action > 0: ButtonPress * action = 0: nothing * action < 0: ButtonRelease * * The comment preceeding each section is the current emulation state. * The comments to the right are of the form *