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

xserver-xorg-input-joystick: Changes to 'debian-unstable'



 .gitignore                  |   78 +++++--
 COPYING                     |   49 +++-
 ChangeLog                   |  418 ++++++++++++++++++++++++++++++++++++++
 Makefile.am                 |   10 
 config/50-joystick-all.conf |   51 ++++
 config/Makefile.am          |    2 
 configure.ac                |  126 +++++------
 debian/changelog            |    6 
 include/Makefile.am         |    2 
 man/Makefile.am             |   62 +----
 man/joystick.man            |   47 +---
 src/Makefile.am             |    3 
 src/backend_bsd.c           |    1 
 src/backend_evdev.c         |    1 
 src/backend_joystick.c      |    1 
 src/jstk.c                  |  319 +++++++++--------------------
 src/jstk.h                  |   13 -
 src/jstk_axis.c             |   15 -
 src/jstk_axis.h             |    8 
 src/jstk_key.c              |  482 ++++++++++----------------------------------
 src/jstk_key.h              |    9 
 src/jstk_options.c          |    5 
 src/jstk_properties.c       |    7 
 23 files changed, 929 insertions(+), 786 deletions(-)

New commits:
commit 5c281ff86830d98abe838e30034a6f6dc388fca6
Author: Julien Cristau <jcristau@debian.org>
Date:   Thu Apr 28 18:14:26 2011 +0200

    Bump changelogs

diff --git a/ChangeLog b/ChangeLog
index b238968..6b0087f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,421 @@
+commit bd6c54fe672a913334bfba1ca5dc0f2e0f1f1152
+Author: Sascha Hlusiak <saschahlusiak@arcor.de>
+Date:   Wed Apr 20 20:55:24 2011 +0200
+
+    joystick 1.6.0
+    
+    Signed-off-by: Sascha Hlusiak <saschahlusiak@arcor.de>
+
+commit f1b8ef560049f1bb1bca9caa12c1529c9f992a09
+Author: Sascha Hlusiak <saschahlusiak@arcor.de>
+Date:   Wed Apr 20 20:48:28 2011 +0200
+
+    Updated man page to reflect latest changes
+
+commit aa78e01edabb27d1b5dcd4ffe2be32878a45e342
+Author: Sascha Hlusiak <saschahlusiak@arcor.de>
+Date:   Wed Apr 20 20:47:33 2011 +0200
+
+    Added xorg.conf.d example snipped
+    
+    Not installed by default, left for distributors.
+    
+    Copy 50-joystick-all.conf to /etc/X11/xorg.conf.d/ and modify to your needs.
+
+commit 29d3745e73d266db173828f40231cb78ec1c383a
+Author: Sascha Hlusiak <saschahlusiak@arcor.de>
+Date:   Wed Apr 20 19:48:28 2011 +0200
+
+    Revert "config: fdi file must be installed in $(datadir)/hal/fdi/policy/20thirdparty"
+    
+    The fdi file was never meant to be installed by default but exists merely as an
+    example and documentation for distributors who may decide to ship it by default or
+    install it in share/doc/...
+    
+    This reverts commit 1d67a2da26fa3ba0b8f5498da89c01aeaa551515.
+
+commit 4358209e7e4383b4ebdec93cc116bb1c21d373a7
+Author: Sascha Hlusiak <saschahlusiak@arcor.de>
+Date:   Wed Apr 20 19:33:10 2011 +0200
+
+    Free pInfo->private only once to fix server crash on unplug (bug #35391)
+    
+    The hotplugged keyboard device and the main device share the same pInfo->private data
+    and the same jstkCoreUnInit, so the data is freed twice. Furthermore, since the keyboard
+    device will delete itself, we must not delete it from within the deletion of the main device.
+    
+    Freeing pInfo->private is done by the main device, hopefully done independently of the order
+    in which the two devices will be removed by the server.
+    
+    Should fix bug #35391
+
+commit 3f03fa76f8fb152210c6ed80191f34e428af2c00
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Apr 6 21:02:49 2011 +1000
+
+    joystick 1.5.99.901
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 8c7ad54d6d869bb4202aee8408c72ed72bf929a7
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 14 17:00:28 2010 +1000
+
+    Support input ABI 12
+    
+    This commit adds support for input ABI 12, consisting of a number of
+    changes:
+    - requires an X server with an ABI of 12
+    - valuators have a per-mode setting
+    - new PreInit prototype.
+    
+    Because of the new PreInit prototype, the hotplug system has been switched
+    around too (should have probably been done in a separate commit before,
+    but...).
+    
+    The old hotplug mechanism added a separate ModuleInfoRec for the keyboard
+    part of the driver. This isn't feasable for InputClass configurations, the
+    driver part may get overwritten.
+    
+    On entering the driver, after checking a few default values, hotplug the
+    keyboard device (wacom-style) and let it initialize. Because NIDR calls
+    DEVICE_INIT and DEVICE_ON the keyboard must initialise the private pointer
+    and pass it back to the original device.
+    
+    Call order is:
+    NewInputDeviceRequest
+     - jstkCorePreInit
+       - jstkKeyboardHotplug
+         - NewInputDeviceRequest
+           - jstkCorePreInit
+             immediately return jstkKeyboardPreInit()
+           - keyboard DEVICE_INIT
+           - keyboard DEVICE_ON
+         return keyboard device
+       - copy keyboard->priv to joystick->priv
+       - finish jstkCorePreInit as normal
+       - joystick DEVICE_INIT
+       - joystick DEVICE_ON
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit f2050e6be5b6b3f8c429060992cc3ead0cfe86c1
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 14 16:51:15 2010 +1000
+
+    Get the option values from pInfo instead of from the IDevRec.
+    
+    Doesn't matter which one we take, but ABI 12 dropped the IDevRec.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit df0567d2fa2d67a00dce78a89803e8925d20e324
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 14 16:48:50 2010 +1000
+
+    Don't call xf86OptionListReport()
+    
+    All options used by the driver will show up in the log anyway.
+    And new xserver versions will call this for debugging purposes for us.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 135aaf612bcb591ae1692ae47b2d36a814230cbe
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 14 15:19:08 2010 +1000
+
+    Purge use of XI_PRIVATE macro.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 29a486ba56bc6279297a716b018ba24880680e82
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 14 15:14:47 2010 +1000
+
+    Drop close_proc, conversion_proc, reverse_conversion_proc
+    
+    All three aren't called by the server.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 0674bdfdb67e9195af7cb5982ae2eda0fa03ce57
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 14 15:09:32 2010 +1000
+
+    Don't handle history_size in the driver.
+    
+    This has been handled in the server for quite a while now, just initialize
+    with the defaults and ignore it otherwise.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 39205d76cb45242ee9b47594ec5be7edc509edc7
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 14 15:08:49 2010 +1000
+
+    Require server 1.9, drop pre-ABI 11 support.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 074dc4a2a06aebae144afc21de5c4f8bc365937d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 14 15:04:44 2010 +1000
+
+    Remove usage of XI86_POINTER_CAPABLE flag.
+    
+    Flag was write-only for a number of server generations already.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit 107e4b14d90d06864247c7878ee0cc5f59e4bc5a
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 14 14:47:31 2010 +1000
+
+    Replace LocalDevicePtr with InputInfoPtr
+    
+    Both typedefs describe the same struct, LocalDevicePtr has been removed with
+    input ABI 12.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Trevor Woerner <twoerner@gmail.com>
+
+commit a23a4a77c7157c516a8194e05e9f07b64d8e8089
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Dec 14 15:03:45 2010 +1000
+
+    Bump to 1.5.99
+
+commit cd6b81d377a5d541100996fa4e2ac2decffe65f1
+Author: Trevor Woerner <twoerner@gmail.com>
+Date:   Sun Oct 17 21:26:16 2010 -0400
+
+    Code cleanup, bad structure initialization.
+    
+    The InputDriverRec data structure in xserver/hw/xfree86/common/xf86Xinput.h
+    no longer contains an integer refCount member; as per commit
+    d568221710959cf7d783e6ff0fb80fb43a231124.
+    
+    Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 38363bde5d94c9a8f163fde31ede067f6d0d1669
+Author: Trevor Woerner <twoerner@gmail.com>
+Date:   Sun Oct 17 21:25:56 2010 -0400
+
+    Deprecated code cleanup.
+    
+    Replace calls to deprecated functions (Xfree(), Xcalloc(), Xmalloc(), etc)
+    with calls to standard dynamic memory functions (free(), calloc(), malloc(),
+    etc) in driver code.
+    
+    Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit d209590c06e7a4df9d921ff53cb9792e9beb1aeb
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Jun 11 22:00:45 2010 -0400
+
+    COPYING: replace stub file with Copyright notices
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 1d67a2da26fa3ba0b8f5498da89c01aeaa551515
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Jun 11 21:50:34 2010 -0400
+
+    config: fdi file must be installed in $(datadir)/hal/fdi/policy/20thirdparty
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 09ca64e76568868e8f9c7bf48e8858669fc5aaa7
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Jun 11 21:47:23 2010 -0400
+
+    config: EXTRA_DIST is redundant
+    
+    sdkdir provides the install path for sdk_HEADERS primary
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 55783bf0cd5e0ae29b008dd3fc3a47c66eabffbd
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Jun 11 17:46:37 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
+    Use $(AM_V_GEN)$(SED) to support silent rule
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 342908f4d06c8000789d659b9f8871e56812b78e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Jun 11 17:41:59 2010 -0400
+
+    config: fix warnings, m4 quoting and layout
+    
+    Fix some m4 quoting
+    Fix some autoconf warnings
+    Regroup statements per section
+    Add comments
+    Remove unused NDEBUG define
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit e98f0d0349222a4d981086f944398d32a548d953
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Apr 18 15:37:29 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.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit c6908579b56b7d8c478ebe8c07e2a68a30c5de44
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Apr 18 15:36:32 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".
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit ab6308ed177fc341ba0cca3e4a9048f858d80007
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Apr 18 15:35:45 2010 -0400
+
+    config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
+    
+    Regroup AC statements at the top.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 2252c78fb11b09c688b1b2cc82a542fc2470b8e2
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Apr 18 15:26:16 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
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 25722aa12bfbb5675a02d7d8520ae83fdc5735c8
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Apr 18 15:24:59 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 <xorg-server.h> in .[hc] files as needed.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 3de065d6822206695c0aee2fd68cd9db8b2f3063
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Feb 11 10:08:07 2010 -0500
+
+    config: move CWARNFLAGS from configure.ac to Makefile.am
+    
+    Compiler warning flags should be explicitly set in the makefile
+    rather than being merged with other packages compiler flags.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 30d1089cffc9afd9fd468a6c30989e77c7884248
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 15:08:26 2010 -0800
+
+    Update Sun license notices to current X.Org standard form
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit efe94ccfb4505f18a44b39ada256df8ba16b3ec5
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Dec 28 15:05:39 2009 -0500
+
+    configure.ac: use backticks rather than $() for cmd subs
+    
+    Use "$PKG_CONFIG" rather than hard coded "pkg-config"
+    
+    Acked-by: Dan Nicholson <dbn.lists@gmail.com>
+    Acked-by: Daniel Stone <daniel@fooishbar.org>
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit ad0abb97a19e311988deffd385ca69e96bd106a4
+Author: Gaetan Nadon <memsize@videotron.ca>
+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 260c441981c1fe1c6e076bde1a6a26328e6b5675
+Author: Gaetan Nadon <memsize@videotron.ca>
+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 877f13a6056cc8b17a73a5d4c839cd8b30065f9b
+Author: Gaetan Nadon <memsize@videotron.ca>
+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 9fc986bd5dc3bd1741b1ad4e4da152edfaf928d9
+Author: Gaetan Nadon <memsize@videotron.ca>
+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 cd4e5ab0c64f477c343ab161ec309c42b9737450
+Author: Gaetan Nadon <memsize@videotron.ca>
+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 eaf8d1a1d87af9f67ca3e3d0436bb9d9a7cfc17a
 Author: Sascha Hlusiak <saschahlusiak@arcor.de>
 Date:   Sat Oct 31 12:41:15 2009 +0100
diff --git a/debian/changelog b/debian/changelog
index e4dc868..d86102b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-input-joystick (1:1.6.0-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Julien Cristau <jcristau@debian.org>  Thu, 28 Apr 2011 18:14:03 +0200
+
 xserver-xorg-input-joystick (1:1.5.0-7) unstable; urgency=low
 
   * Switch to dh:

commit bd6c54fe672a913334bfba1ca5dc0f2e0f1f1152
Author: Sascha Hlusiak <saschahlusiak@arcor.de>
Date:   Wed Apr 20 20:55:24 2011 +0200

    joystick 1.6.0
    
    Signed-off-by: Sascha Hlusiak <saschahlusiak@arcor.de>

diff --git a/configure.ac b/configure.ac
index 563b15c..73afa9a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-joystick],
-        [1.5.99.901],
+        [1.6.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-joystick])
 AC_CONFIG_SRCDIR([Makefile.am])

commit f1b8ef560049f1bb1bca9caa12c1529c9f992a09
Author: Sascha Hlusiak <saschahlusiak@arcor.de>
Date:   Wed Apr 20 20:48:28 2011 +0200

    Updated man page to reflect latest changes

diff --git a/man/joystick.man b/man/joystick.man
index 97e3ba3..da92ceb 100644
--- a/man/joystick.man
+++ b/man/joystick.man
@@ -4,14 +4,19 @@
 .SH NAME
 joystick \- Joystick input driver
 .SH SYNOPSIS
+Snipped for xorg.conf.d(5):
+
 .nf
-.B "Section \*qInputDevice\*q"
-.BI "  Identifier \*q" devname \*q
-.B  "  Driver \*qjoystick\*q"
-.BI "  Option \*qDevice\*q   \*q" devpath \*q
+.B "Section \*qInputClass\*q"
+.BI "  Identifier \*q" joystick-all \*q
+.BI  "  Driver \*q" joystick \*q
+.BI "  Option \*qMatchIsJoystick\*q   \*q" on \*q
+.BI "  Option \*qMatchDevicePath \*q" /dev/input/event* \*q
 \ \ ...
 .B EndSection
 .fi
+
+
 .SH DESCRIPTION
 .B joystick
 is an __xservername__ input driver for Joysticks. There are 3 backends available that are used in the following order, if support was found:
@@ -314,33 +319,21 @@ The keys for the first two axes will be generated in an interval according to th
 The keys for the third and fourth axis are generated once when the axis moves out of the deadzone and when it moves back into the deadzone. X.Org will autorepeat those keys according to current keyboard settings.
 
 .SH "NOTES"
-The driver does not do hotplugging on it's own. The joystick needs to be plugged in when the driver is loaded.
-If the joystick is unplugged, the device will be automatically deactivated.
-.P
-There is an example hal policy in
+Configuration through
+.I InputClass
+sections is recommended in X servers 1.8 and later. See xorg.conf.d(5) for more details. An example xorg.conf.d snipped is provided in 
+.I ${sourcecode}/config/50-joystick-all.conf
+
+Configuration through hal fdi files is recommended in X servers 1.5,
+1.6 and 1.7. An example hal policy file is still provided in 
 .I ${sourcecode}/config/50-x11-input-joystick.fdi
-which will take care of hotplugging. Place it in
-.I /etc/hal/fdi/policy 
-and customize it to your needs. Pass custom options to the driver using x11_options properties. This requires xorg-server-1.5 or 
-higher.
-.P
-Make sure you add the 
-.I \*qSendCoreEvents\*q
-keyword to the device entry of your
-.B ServerLayout
-section of the 
-.I xorg.conf
-file, otherwise the device won't report core pointer and core key events.
-
-Example: 
-.nf
-.BI "    InputDevice     " "\*qJoystick1\*q     \*qSendCoreEvents\*q"
-.fi
+to be placed in
+.IR /etc/hal/fdi/policy .
 
 
 .SH "SEE ALSO"
-__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__), xmodmap(1)
+__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorg.conf.d(5), Xserver(__appmansuffix__), X(__miscmansuffix__), xmodmap(1)
 .SH AUTHORS
-Sascha Hlusiak (2007-2009),
+Sascha Hlusiak (2007-2011),
 .fi
 Frederic Lepied (1995-1999)

commit aa78e01edabb27d1b5dcd4ffe2be32878a45e342
Author: Sascha Hlusiak <saschahlusiak@arcor.de>
Date:   Wed Apr 20 20:47:33 2011 +0200

    Added xorg.conf.d example snipped
    
    Not installed by default, left for distributors.
    
    Copy 50-joystick-all.conf to /etc/X11/xorg.conf.d/ and modify to your needs.

diff --git a/config/50-joystick-all.conf b/config/50-joystick-all.conf
new file mode 100644
index 0000000..ee03dd5
--- /dev/null
+++ b/config/50-joystick-all.conf
@@ -0,0 +1,51 @@
+# Example xorg.conf.d snippet that assigns the joystick driver
+# to all joysticks. See xorg.conf.d(5) for more information on
+# InputClass.
+# DO NOT EDIT THIS FILE, your distribution will likely overwrite
+# it when updating. Copy (and rename) this file into
+# /etc/X11/xorg.conf.d first.
+# Additional options may be added in the form of
+#   Option "OptionName" "value"
+#
+
+Section "InputClass"
+	Identifier "joystick-all"
+
+	# UNCOMMENT TO ENABLE HOTPLUGGING OF JOYSTICKS
+#	Driver "joystick"
+#	MatchIsJoystick "on"
+#	MatchDevicePath "/dev/input/event*"
+
+	Option "MapButton1" "button=1"
+	Option "MapButton2" "button=2"
+	Option "MapButton3" "button=3"
+
+	Option "MapAxis1"   "mode=relative axis=+1x deadzone=5000"
+	Option "MapAxis2"   "mode=relative axis=+1y deadzone=5000"
+	Option "MapAxis3"   "mode=relative axis=+1zx deadzone=5000"
+	Option "MapAxis4"   "mode=relative axis=+1zy deadzone=5000"
+	Option "MapAxis5"   "mode=accelerated axis=+1x deadzone=5000"
+	Option "MapAxis6"   "mode=accelerated axis=+1y deadzone=5000"
+
+        
+	# Map Alt+Tab to button #4
+#	Option "MapButton4" "key=64+23"
+
+	# Button 8 will slow down all movement to factor 0.3
+#	Option "MapButton8" "amplify=0.3"
+
+	# Button 9 will disable all events except button #9 itself
+#	Option "MapButton9" "disable-all"
+
+	# Map button #10 to Space
+#	Option "MapButton10" "key=65"
+
+	# Map axis #1 and #2 to the keycodes for Left, Right, Up and Down rather 
+	# than pointer movement
+#	Option "MapAxis1" "mode=accelerated keylow=113 keyhigh=114"
+#	Option "MapAxis2" "mode=accelerated keylow=111 keyhigh=116"
+
+#	Option "XkbLayout" "de"
+#	Option "XkbVariant" "nodeadkeys"
+#	Option "AutoRepeat" "400 25"
+EndSection
diff --git a/config/Makefile.am b/config/Makefile.am
index c96ffeb..2aef071 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -1 +1 @@
-EXTRA_DIST = 50-x11-input-joystick.fdi
+EXTRA_DIST = 50-x11-input-joystick.fdi 50-joystick-all.conf

commit 29d3745e73d266db173828f40231cb78ec1c383a
Author: Sascha Hlusiak <saschahlusiak@arcor.de>
Date:   Wed Apr 20 19:48:28 2011 +0200

    Revert "config: fdi file must be installed in $(datadir)/hal/fdi/policy/20thirdparty"
    
    The fdi file was never meant to be installed by default but exists merely as an
    example and documentation for distributors who may decide to ship it by default or
    install it in share/doc/...
    
    This reverts commit 1d67a2da26fa3ba0b8f5498da89c01aeaa551515.

diff --git a/config/Makefile.am b/config/Makefile.am
index 776308f..c96ffeb 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -1,3 +1 @@
-fdidir = $(datadir)/hal/fdi/policy/20thirdparty
-dist_fdi_DATA = 50-x11-input-joystick.fdi
-
+EXTRA_DIST = 50-x11-input-joystick.fdi

commit 4358209e7e4383b4ebdec93cc116bb1c21d373a7
Author: Sascha Hlusiak <saschahlusiak@arcor.de>
Date:   Wed Apr 20 19:33:10 2011 +0200

    Free pInfo->private only once to fix server crash on unplug (bug #35391)
    
    The hotplugged keyboard device and the main device share the same pInfo->private data
    and the same jstkCoreUnInit, so the data is freed twice. Furthermore, since the keyboard
    device will delete itself, we must not delete it from within the deletion of the main device.
    
    Freeing pInfo->private is done by the main device, hopefully done independently of the order
    in which the two devices will be removed by the server.
    
    Should fix bug #35391

diff --git a/src/jstk.c b/src/jstk.c
index 9796a46..ec6b79a 100644
--- a/src/jstk.c
+++ b/src/jstk.c
@@ -611,6 +611,10 @@ SetupProc_fail:
  * jstkCoreUnInit --
  *
  * Called when a device is unplugged and needs to be removed
+ * This is a bit tricky, because the keyboard device and the main device
+ * share the same private data, which must be freed only once, which is done
+ * by the main device.
+ * 
  *
  ***************************************************************************
  */
@@ -620,15 +624,24 @@ jstkCoreUnInit(InputDriverPtr    drv,
                InputInfoPtr      pInfo,
                int               flags)
 {
-    JoystickDevPtr device = (JoystickDevPtr) pInfo->private;
-
-    if (device->keyboard_device != NULL)
-    {
-        xf86DisableDevice(device->keyboard_device->dev, TRUE);
-        device->keyboard_device = NULL;
+    if (pInfo->private) {
+	JoystickDevPtr priv = (JoystickDevPtr) pInfo->private;
+	if (priv->keyboard_device == pInfo) {
+	    /* this is the keyboard device */
+	    /* Unlink from private data to notify that the 
+	     * keyboard device is no more, but don't free */
+	    priv->keyboard_device = NULL;
+	} else {
+	    /* freeing main device
+	       if keyboard still exists, notify keyboard device that it's
+	       private data is gone */
+	    if (priv->keyboard_device)
+		priv->keyboard_device->private = NULL;
+	    
+	    free (priv);
+	}
     }
 
-    free (device);
     pInfo->private = NULL;
     xf86DeleteInput(pInfo, 0);
 }

commit 3f03fa76f8fb152210c6ed80191f34e428af2c00
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 6 21:02:49 2011 +1000

    joystick 1.5.99.901
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 04b2f44..563b15c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-joystick],
-        [1.5.99],
+        [1.5.99.901],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-joystick])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 8c7ad54d6d869bb4202aee8408c72ed72bf929a7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Dec 14 17:00:28 2010 +1000

    Support input ABI 12
    
    This commit adds support for input ABI 12, consisting of a number of
    changes:
    - requires an X server with an ABI of 12
    - valuators have a per-mode setting
    - new PreInit prototype.
    
    Because of the new PreInit prototype, the hotplug system has been switched
    around too (should have probably been done in a separate commit before,
    but...).
    
    The old hotplug mechanism added a separate ModuleInfoRec for the keyboard
    part of the driver. This isn't feasable for InputClass configurations, the
    driver part may get overwritten.
    
    On entering the driver, after checking a few default values, hotplug the
    keyboard device (wacom-style) and let it initialize. Because NIDR calls
    DEVICE_INIT and DEVICE_ON the keyboard must initialise the private pointer
    and pass it back to the original device.
    
    Call order is:
    NewInputDeviceRequest
     - jstkCorePreInit
       - jstkKeyboardHotplug
         - NewInputDeviceRequest
           - jstkCorePreInit
             immediately return jstkKeyboardPreInit()
           - keyboard DEVICE_INIT
           - keyboard DEVICE_ON
         return keyboard device
       - copy keyboard->priv to joystick->priv
       - finish jstkCorePreInit as normal
       - joystick DEVICE_INIT
       - joystick DEVICE_ON
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Trevor Woerner <twoerner@gmail.com>

diff --git a/configure.ac b/configure.ac
index 6da920b..04b2f44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,7 +49,7 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
 XORG_DRIVER_CHECK_EXT(XKB, kbproto)
 
 # Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9.0] xproto $REQUIRED_MODULES)
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9.99.2] xproto $REQUIRED_MODULES)
 
 DRIVER_NAME=joystick
 AC_SUBST([DRIVER_NAME])
diff --git a/src/jstk.c b/src/jstk.c
index 1d5befc..9796a46 100644
--- a/src/jstk.c
+++ b/src/jstk.c
@@ -347,7 +347,8 @@ jstkDeviceControlProc(DeviceIntPtr       pJstk,
                                    screenInfo.screens[0]->width, /* max val */
                                    1, /* resolution */
                                    0, /* min_res */
-                                   1); /* max_res */
+                                   1, /* max_res */
+                                   Absolute);
             InitValuatorAxisStruct(pJstk,
                                    1, /* valuator num */
                                    XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y),
@@ -355,7 +356,8 @@ jstkDeviceControlProc(DeviceIntPtr       pJstk,
                                    screenInfo.screens[0]->height, /* max val */
                                    1, /* resolution */
                                    0, /* min_res */
-                                   1); /* max_res */
+                                   1, /* max_res */
+                                   Absolute);
             for (i=0; i<MAXAXES; i++) 
                 if (priv->axis[i].valuator != -1)
             {
@@ -366,23 +368,13 @@ jstkDeviceControlProc(DeviceIntPtr       pJstk,
                                        32767,  /* max val */
                                        1, /* resolution */
                                        0, /* min_res */
-                                       1); /* max_res */
+                                       1, /* max_res */
+                                       Absolute);
             }
             /* allocate the motion history buffer if needed */
             xf86MotionHistoryAllocate(pInfo);
         }
 
-
-        if (priv->keyboard_device != NULL)
-        {
-            DBG(2, ErrorF("Activating keyboard device\n"));
-            xf86ActivateDevice(priv->keyboard_device);
-            priv->keyboard_device->dev->inited = 
-                (priv->keyboard_device->device_control(priv->keyboard_device->dev, DEVICE_INIT) == Success);
-            xf86EnableDevice(priv->keyboard_device->dev);
-            DBG(2, ErrorF("Keyboard device activated\n"));
-        }
-
 	jstkInitProperties(pJstk, priv);
 
         break;
@@ -433,18 +425,6 @@ jstkDeviceControlProc(DeviceIntPtr       pJstk,
     return Success;
 }
 
-
-
-
-_X_EXPORT InputDriverRec JSTK_KEYBOARD = {
-    1,
-    "joystick_keyboard",
-    NULL,
-    jstkKeyboardPreInit,
-    jstkKeyboardUnInit,
-    NULL
-};
-
 /*
  ***************************************************************************
  *
@@ -452,37 +432,41 @@ _X_EXPORT InputDriverRec JSTK_KEYBOARD = {
  *
  * Called when a device will be instantiated
  *
+ * This is a tad complicated. NewInputDeviceRequest(), which we use to
+ * hotplug a keyboard device,. enables the device, so we need to make sure
+ * that all options for the dependent device are set correctly.
+ *
+ * This means that we parse the keyboard-specific options into the
+ * keyboard device's PreInit, and re-use the keyboard's priv field.
+ *
  ***************************************************************************
  */
 
-static InputInfoPtr
-jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
+static int
+jstkCorePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
 {
-    InputInfoPtr        pInfo = NULL;
+    InputInfoPtr        keyboard_device;
     JoystickDevPtr      priv = NULL;
     char                *s;
     int                 i, j;
 
-    pInfo = xf86AllocateInput(drv, 0);
-    if (!pInfo) {
-        goto SetupProc_fail;
-    }
-
-    pInfo->private = (JoystickDevPtr)malloc(sizeof(JoystickDevRec));
-    priv = (JoystickDevPtr)pInfo->private;
+    s = xf86CheckStrOption(pInfo->options, "_source", "");
+    if (strcmp(s, "_driver/joystick") == 0)
+        return jstkKeyboardPreInit(drv, pInfo, flags);
 
-    pInfo->name   = dev->identifier;
-    pInfo->flags  = XI86_SEND_DRAG_EVENTS;
     pInfo->device_control = jstkDeviceControlProc;
     pInfo->read_input = jstkReadProc;
     pInfo->control_proc = NULL;
     pInfo->switch_mode = NULL;
     pInfo->fd = -1;
     pInfo->dev = NULL;
-    pInfo->private = priv;
     pInfo->type_name = XI_JOYSTICK;
-    pInfo->always_core_feedback = NULL;
-    pInfo->conf_idev = dev;
+
+    keyboard_device = jstkKeyboardHotplug(pInfo, flags);
+    if (!keyboard_device)
+        return BadAlloc;
+
+    pInfo->private = priv = keyboard_device->private;
 
     priv->fd = -1;
     priv->open_proc = NULL;
@@ -495,9 +479,7 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
     priv->mouse_enabled = TRUE;
     priv->keys_enabled = TRUE;
     priv->amplify = 1.0f;
-    priv->keyboard_device = NULL;
-    priv->repeat_delay = 0;
-    priv->repeat_interval = 0;
+    priv->keyboard_device = keyboard_device;
     priv->num_axes    = MAXAXES;
     priv->num_buttons = MAXBUTTONS;
 
@@ -555,8 +537,6 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
     priv->axis[5].type      = JSTK_TYPE_ACCELERATED;
     priv->axis[5].mapping   = JSTK_MAPPING_Y;
 
-    xf86CollectInputOptions(pInfo, NULL, NULL);
-
     /* Joystick device is mandatory */
     priv->device = xf86SetStrOption(pInfo->options, "Device", NULL);
     if (!priv->device)
@@ -567,8 +547,6 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
         goto SetupProc_fail;
     }
 
-    xf86ProcessCommonOptions(pInfo, pInfo->options);
-
 #if DEBUG
     debug_level = xf86SetIntOption(pInfo->options, "DebugLevel", 0);
     if (debug_level > 0) {
@@ -582,43 +560,6 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
     }
 #endif
 
-    /* Parse option for autorepeat */
-    if ((s = xf86SetStrOption(pInfo->options, "AutoRepeat", NULL))) {
-        int delay, rate;
-        if (sscanf(s, "%d %d", &delay, &rate) != 2) {
-            xf86Msg(X_ERROR, "%s: \"%s\" is not a valid AutoRepeat value", 
-                    pInfo->name, s);
-        } else {
-            priv->repeat_delay = delay;
-            if (rate != 0)
-                priv->repeat_interval = 1000/rate;
-            else priv->repeat_interval = 0;
-            DBG(1, xf86Msg(X_CONFIG, "Autorepeat set to delay=%d, interval=%d\n",
-                           priv->repeat_delay,priv->repeat_interval));
-        }
-        free(s);
-    }
-    
-    priv->rmlvo.rules = xf86SetStrOption(pInfo->options, "xkb_rules", NULL);
-    if (!priv->rmlvo.rules)
-	priv->rmlvo.rules = xf86SetStrOption(pInfo->options, "XkbRules", "evdev");
-
-    priv->rmlvo.model = xf86SetStrOption(pInfo->options, "xkb_model", NULL);
-    if (!priv->rmlvo.model)
-	priv->rmlvo.model = xf86SetStrOption(pInfo->options, "XkbModel", "evdev");
-
-    priv->rmlvo.layout = xf86SetStrOption(pInfo->options, "xkb_layout", NULL);
-    if (!priv->rmlvo.layout)
-	priv->rmlvo.layout = xf86SetStrOption(pInfo->options, "XkbLayout", "us");


Reply to: