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

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



 ChangeLog                  |  105 +++++++++++++++++++++++++++++++++++++++++++++
 configure.ac               |    2 
 debian/changelog           |    6 ++
 debian/control             |   10 ----
 include/evdev-properties.h |    2 
 man/evdev.man              |    8 +++
 src/emuMB.c                |   47 +++++++++++++++++++-
 src/evdev.c                |    9 +--
 src/evdev.h                |    1 
 9 files changed, 173 insertions(+), 17 deletions(-)

New commits:
commit 0342963c348e5756f5eb391053dae5bc9fa57be1
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Wed Jan 18 13:39:54 2017 +0100

    Move URL from description to Homepage field.

diff --git a/debian/control b/debian/control
index ea34d15..ba4d942 100644
--- a/debian/control
+++ b/debian/control
@@ -18,6 +18,7 @@ Build-Depends:
  libmtdev-dev,
  libevdev-dev (>= 1.2.2+dfsg-1~),
 Standards-Version: 3.9.8
+Homepage: https://www.x.org
 Vcs-Git: https://anonscm.debian.org/git/pkg-xorg/driver/xserver-xorg-input-evdev.git
 Vcs-Browser: https://anonscm.debian.org/git/pkg-xorg/driver/xserver-xorg-input-evdev.git
 
@@ -36,9 +37,6 @@ Description: X.Org X server -- evdev input driver
  kernel's event delivery mechanism.  This driver allows for multiple keyboards
  and mice to be treated as separate input devices.
  .
- More information about X.Org can be found at:
- <URL:https://www.X.org>
- .
  This package is built from the X.org xf86-input-evdev driver module.
 
 Package: xserver-xorg-input-evdev-udeb
@@ -66,9 +64,6 @@ Description: X.Org X server -- evdev input driver (development headers)
  found in xserver-xorg-input-evdev. Non-developers likely have little use
  for this package.
  .
- More information about X.Org can be found at:
- <URL:https://www.X.org>
- .
  This package is built from the X.org xf86-input-evdev driver module.
 
 Package: xserver-xorg-input-evdev-dbg
@@ -83,9 +78,6 @@ Description: X.Org X server -- evdev input driver (debug symbols)
  found in xserver-xorg-input-evdev. Non-developers likely have little use
  for this package.
  .
- More information about X.Org can be found at:
- <URL:https://www.X.org>
- .
  This package is built from the X.org xf86-input-evdev driver module.
  .
  This package provides debugging symbols for this Xorg X driver.

commit ac71264dc32ada7343102fd586333294963cd6ee
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Wed Jan 18 13:38:04 2017 +0100

    Bump changelogs

diff --git a/ChangeLog b/ChangeLog
index 39c1b10..c59a3c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,108 @@
+commit 1dd61111adea1d137877ca1a9642e1552a152355
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Jan 18 13:14:29 2017 +1000
+
+    evdev 2.10.5
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 231061d004ee4e924bb736adc428287367d2001c
+Author: Alexander Volkov <a.volkov@rusbitech.ru>
+Date:   Mon Dec 26 17:39:32 2016 +0300
+
+    Don't send pointer events in addition to touch events
+    
+    Updating abs_vals for touch events since d24431a1863c49aa9edcabf535ffa64bfa87053c
+    leads to posting Motion events with updated coordinates to the X server,
+    which in turn resends them to clients.
+    
+    Don't queue Motion events for touch events, the X server should
+    synthesize them itself.
+    
+    Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 425ed6017a42937f69c1e8450ea8f3c6c6c20928
+Author: David Strobach <lalochcz@gmail.com>
+Date:   Thu Nov 17 20:47:31 2016 +0100
+
+    Middle emulation - make the emulated button number configurable
+    
+    Sometimes it may be desirable to remap physical middle button
+    to something else and use emulation instead. The emulation is
+    however hardcoded to emulate physical button 2, so the emulated
+    button gets remapped together with the physical one. This patch
+    adds the Emulate3Button configuration option to allow for user
+    selection of the emulated button number and a configuration
+    like this:
+    
+    Section "InputClass"
+        Identifier "Middle button emulation config"
+        MatchProduct ".... some device ..."
+        MatchDriver "evdev"
+        Option "Emulate3Buttons" "on"
+        Option "Emulate3Button" "9"
+    EndSection
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 7251e42dfbac11eb1619b0a3881ee463b6d76c95
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Oct 21 09:42:23 2016 +1000
+
+    Fix off-by-one error counting axes
+    
+    We stopped counting one too early, but still initialized that axis later,
+    leading to a bug macro to trigger.
+    
+    https://bugs.freedesktop.org/show_bug.cgi?id=97956
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 551db5b86e2a19e027e57571b8e5405dacb8bd67
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Sat Oct 1 17:48:30 2016 +1000
+
+    evdev 2.10.4
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit bb8bde7456def4186f9a4a0a9f98d53c949e1450
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue May 31 17:52:43 2016 -0700
+
+    Support XINPUT ABI 24 (remove select mask from block/wakeup handlers)
+    
+    The evdev driver wasn't using the select mask arguments, so this
+    change just involves adjusting the argument lists.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 7b1267f7f18c478d3dc34a7668eaefa402815891
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue May 31 17:52:42 2016 -0700
+
+    Support XINPUT ABI version 23 (threaded input)
+    
+    Use input_lock/input_unlock calls instead of SIGIO functions
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit e08b0332761b0cff6d6a3f5d7e88c22f786bd530
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue May 31 17:52:41 2016 -0700
+
+    Report errors when attempting to write keyboard controls
+    
+    This is mostly to eliminate a compiler warning.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
 commit 7c1971d9e7b73b861874633a33f97487abf1d45d
 Author: Peter Hutterer <peter.hutterer@who-t.net>
 Date:   Wed Jun 1 11:41:03 2016 +1000
diff --git a/debian/changelog b/debian/changelog
index 76f22a0..fe7186c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-input-evdev (1:2.10.5-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Andreas Boll <andreas.boll.dev@gmail.com>  Wed, 18 Jan 2017 13:36:59 +0100
+
 xserver-xorg-input-evdev (1:2.10.4-1) unstable; urgency=medium
 
   [ Emilio Pozuelo Monfort ]

commit 1dd61111adea1d137877ca1a9642e1552a152355
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Jan 18 13:14:29 2017 +1000

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

diff --git a/configure.ac b/configure.ac
index e4887a3..e59f6e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-evdev],
-        [2.10.4],
+        [2.10.5],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-evdev])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 231061d004ee4e924bb736adc428287367d2001c
Author: Alexander Volkov <a.volkov@rusbitech.ru>
Date:   Mon Dec 26 17:39:32 2016 +0300

    Don't send pointer events in addition to touch events
    
    Updating abs_vals for touch events since d24431a1863c49aa9edcabf535ffa64bfa87053c
    leads to posting Motion events with updated coordinates to the X server,
    which in turn resends them to clients.
    
    Don't queue Motion events for touch events, the X server should
    synthesize them itself.
    
    Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/evdev.c b/src/evdev.c
index 96fd97d..f627fd0 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -784,7 +784,6 @@ EvdevProcessAbsoluteMotionEvent(InputInfoPtr pInfo, struct input_event *ev)
 
     if (ev->code >= ABS_MT_SLOT) {
         EvdevProcessTouchEvent(pInfo, ev);
-        pEvdev->abs_queued = 1;
     } else if (!pEvdev->mt_mask) {
         map = pEvdev->abs_axis_map[ev->code];
 

commit 425ed6017a42937f69c1e8450ea8f3c6c6c20928
Author: David Strobach <lalochcz@gmail.com>
Date:   Thu Nov 17 20:47:31 2016 +0100

    Middle emulation - make the emulated button number configurable
    
    Sometimes it may be desirable to remap physical middle button
    to something else and use emulation instead. The emulation is
    however hardcoded to emulate physical button 2, so the emulated
    button gets remapped together with the physical one. This patch
    adds the Emulate3Button configuration option to allow for user
    selection of the emulated button number and a configuration
    like this:
    
    Section "InputClass"
        Identifier "Middle button emulation config"
        MatchProduct ".... some device ..."
        MatchDriver "evdev"
        Option "Emulate3Buttons" "on"
        Option "Emulate3Button" "9"
    EndSection
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/include/evdev-properties.h b/include/evdev-properties.h
index 8ae5ba3..c61aa49 100644
--- a/include/evdev-properties.h
+++ b/include/evdev-properties.h
@@ -33,6 +33,8 @@
 #define EVDEV_PROP_MIDBUTTON "Evdev Middle Button Emulation"
 /* CARD32 */
 #define EVDEV_PROP_MIDBUTTON_TIMEOUT "Evdev Middle Button Timeout"
+/* CARD8 */
+#define EVDEV_PROP_MIDBUTTON_BUTTON "Evdev Middle Button Button"
 
 /* Wheel emulation */
 /* BOOL */
diff --git a/man/evdev.man b/man/evdev.man
index 8d84364..e39736a 100644
--- a/man/evdev.man
+++ b/man/evdev.man
@@ -94,6 +94,11 @@ 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: "Evdev Middle Button Timeout".
 .TP 7
+.BI "Option \*qEmulate3Button\*q \*q" integer \*q
+Specifies the physical button number to be emitted if middle button emulation
+is triggered.
+Default: 2.  Property: "Evdev Middle Button Button".
+.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
@@ -283,6 +288,9 @@ value.
 .BI "Evdev Middle Button Timeout"
 1 16-bit positive value.
 .TP 7
+.BI "Evdev Middle Button Button"
+1 8-bit value, allowed range 0-32, 0 disables the button.
+.TP 7
 .BI "Evdev Wheel Emulation"
 1 boolean value (8 bit, 0 or 1).
 .TP 7
diff --git a/src/emuMB.c b/src/emuMB.c
index d1777aa..4f00e0d 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -45,6 +45,7 @@
 
 static Atom prop_mbemu     = 0; /* Middle button emulation on/off property */
 static Atom prop_mbtimeout = 0; /* Middle button timeout property */
+static Atom prop_mbbuton   = 0; /* Middle button target button property */
 /*
  * Lets create a simple finite-state machine for 3 button emulation:
  *
@@ -185,6 +186,7 @@ EvdevMBEmuTimer(InputInfoPtr pInfo)
 {
     EvdevPtr pEvdev = pInfo->private;
     int id;
+    int mapped_id;
 
 #if HAVE_THREADED_INPUT
     input_lock();
@@ -194,7 +196,10 @@ EvdevMBEmuTimer(InputInfoPtr pInfo)
 
     pEvdev->emulateMB.pending = FALSE;
     if ((id = stateTab[pEvdev->emulateMB.state][4][0]) != 0) {
-        EvdevPostButtonEvent(pInfo, abs(id),
+        mapped_id = abs(id);
+        if (mapped_id == 2)
+            mapped_id = pEvdev->emulateMB.button;
+        EvdevPostButtonEvent(pInfo, mapped_id,
                              (id >= 0) ? BUTTON_PRESS : BUTTON_RELEASE);
         pEvdev->emulateMB.state =
             stateTab[pEvdev->emulateMB.state][4][2];
@@ -226,6 +231,7 @@ EvdevMBEmuFilterEvent(InputInfoPtr pInfo, int button, BOOL press)
 {
     EvdevPtr pEvdev = pInfo->private;
     int id;
+    int mapped_id;
     int *btstate;
     int ret = FALSE;
 
@@ -244,7 +250,10 @@ EvdevMBEmuFilterEvent(InputInfoPtr pInfo, int button, BOOL press)
 
     if ((id = stateTab[pEvdev->emulateMB.state][*btstate][0]) != 0)
     {
-        EvdevQueueButtonEvent(pInfo, abs(id), (id >= 0));
+        mapped_id = abs(id);
+        if (mapped_id == 2)
+            mapped_id = pEvdev->emulateMB.button;
+        EvdevQueueButtonEvent(pInfo, mapped_id, (id >= 0));
         ret = TRUE;
     }
     if ((id = stateTab[pEvdev->emulateMB.state][*btstate][1]) != 0)
@@ -301,12 +310,23 @@ void
 EvdevMBEmuPreInit(InputInfoPtr pInfo)
 {
     EvdevPtr pEvdev = (EvdevPtr)pInfo->private;
+    int bt;
 
     pEvdev->emulateMB.enabled = xf86SetBoolOption(pInfo->options,
                                                   "Emulate3Buttons",
                                                   FALSE);
     pEvdev->emulateMB.timeout = xf86SetIntOption(pInfo->options,
                                                  "Emulate3Timeout", 50);
+    bt = xf86SetIntOption(pInfo->options, "Emulate3Button", 2);
+    if (bt < 0 || bt > EVDEV_MAXBUTTONS) {
+        xf86IDrvMsg(pInfo, X_WARNING, "Invalid Emulate3Button value: %d\n",
+                    bt);
+        xf86IDrvMsg(pInfo, X_WARNING, "Middle button emulation disabled.\n");
+
+        pEvdev->emulateMB.enabled = FALSE;
+    }
+
+    pEvdev->emulateMB.button = bt;
 }
 
 void
@@ -338,6 +358,7 @@ EvdevMBEmuSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
 {
     InputInfoPtr pInfo  = dev->public.devicePrivate;
     EvdevPtr     pEvdev = pInfo->private;
+    int bt;
 
     if (atom == prop_mbemu)
     {
@@ -353,6 +374,18 @@ EvdevMBEmuSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
 
         if (!checkonly)
             pEvdev->emulateMB.timeout = *((CARD32*)val->data);
+    } else if (atom == prop_mbbuton)
+    {
+        if (val->format != 8 || val->size != 1 || val->type != XA_INTEGER)
+            return BadMatch;
+
+        bt = *((CARD8*)val->data);
+
+        if (bt < 0 || bt > EVDEV_MAXBUTTONS)
+            return BadValue;
+
+        if (!checkonly)
+            pEvdev->emulateMB.button = bt;
     }
 
     return Success;
@@ -390,5 +423,15 @@ EvdevMBEmuInitProperty(DeviceIntPtr dev)
         return;
     XISetDevicePropertyDeletable(dev, prop_mbtimeout, FALSE);
 
+    prop_mbbuton = MakeAtom(EVDEV_PROP_MIDBUTTON_BUTTON,
+                              strlen(EVDEV_PROP_MIDBUTTON_BUTTON),
+                              TRUE);
+    rc = XIChangeDeviceProperty(dev, prop_mbbuton, XA_INTEGER, 8, PropModeReplace, 1,
+                                &pEvdev->emulateMB.button, FALSE);
+
+    if (rc != Success)
+        return;
+    XISetDevicePropertyDeletable(dev, prop_mbbuton, FALSE);
+
     XIRegisterPropertyHandler(dev, EvdevMBEmuSetProperty, NULL, NULL);
 }
diff --git a/src/evdev.h b/src/evdev.h
index c506296..7081182 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -196,6 +196,7 @@ typedef struct {
         int                 state;       /* state machine (see bt3emu.c) */
         Time                expires;     /* time of expiry */
         Time                timeout;
+        uint8_t             button;      /* phys button to emit */
     } emulateMB;
     /* Third mouse button emulation */
     struct emulate3B {

commit 7251e42dfbac11eb1619b0a3881ee463b6d76c95
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Oct 21 09:42:23 2016 +1000

    Fix off-by-one error counting axes
    
    We stopped counting one too early, but still initialized that axis later,
    leading to a bug macro to trigger.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=97956
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/src/evdev.c b/src/evdev.c
index 5ace238..96fd97d 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1238,7 +1238,7 @@ EvdevCountMTAxes(EvdevPtr pEvdev, int *num_mt_axes_total,
         return;
 
     /* Absolute multitouch axes: adjust mapping and axes counts. */
-    for (axis = ABS_MT_SLOT; axis < ABS_MAX; axis++)
+    for (axis = ABS_MT_SLOT; axis <= ABS_MAX; axis++)
     {
         int j;
         Bool skip = FALSE;
@@ -1288,7 +1288,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device, int num_scroll_axes)
         goto out;
 
     /* Find number of absolute axis, including MT ones, will decrease later. */
-    for (i = 0; i < ABS_MAX; i++)
+    for (i = 0; i <= ABS_MAX; i++)
         if (libevdev_has_event_code(pEvdev->dev, EV_ABS, i))
             num_axes++;
 
@@ -1456,7 +1456,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device, int num_scroll_axes)
         }
 
         for (i = 0; i < num_touches; i++) {
-            for (axis = ABS_MT_TOUCH_MAJOR; axis < ABS_MAX; axis++) {
+            for (axis = ABS_MT_TOUCH_MAJOR; axis <= ABS_MAX; axis++) {
                 if (pEvdev->abs_axis_map[axis] >= 0) {
                     int val = pEvdev->mtdev ? 0 : libevdev_get_current_slot(pEvdev->dev);
                     /* XXX: read initial values from mtdev when it adds support
@@ -1669,7 +1669,7 @@ EvdevAddRelValuatorClass(DeviceIntPtr device, int num_scroll_axes)
     if (!libevdev_has_event_type(pEvdev->dev, EV_REL))
         goto out;
 
-    for (i = 0; i < REL_MAX; i++) {
+    for (i = 0; i <= REL_MAX; i++) {
         if (i == REL_WHEEL || i == REL_HWHEEL || i == REL_DIAL)
             continue;
 


Reply to: