libXi: Changes to 'master'

Peter Hutterer whot at kemper.freedesktop.org
Mon Oct 24 06:00:48 UTC 2016


 man/XListInputDevices.txt |   12 ++++++++++--
 src/XListDev.c            |   45 +++++++++++++++++++++++++--------------------
 2 files changed, 35 insertions(+), 22 deletions(-)

New commits:
commit 43904c9c5a0f5750a03a9bd8c96ccda182eb5a9a
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Oct 13 13:33:11 2016 +1000

    XListInputDevices: don't touch ndevices in case of error
    
    We used to always set *ndevices to the number of devices returned by the
    server. This magically worked because we pretty much never returned an error
    except on faulty server or library implementations. With 19a9cd60 we now have
    more chances of getting an error, so the polite thing is to just leave *ndevices
    alone when we error out.
    
    Document it as such in the man page, just in case someone accidentally reads
    it.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    CC: Niels Ole Salscheider <niels_ole at salscheider-online.de>
    Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>

commit b843fe1c0a6b4dbaae9f364042c6a247249305ef
Author: Niels Ole Salscheider <niels_ole at salscheider-online.de>
Date:   Fri Oct 7 21:46:44 2016 +0200

    SizeClassInfo can return 0 even without an error
    
    Catch the error case separately. Commit 19a9cd607d added length checking to
    SizeClassInfo but re-used the return value of 0 for an error. A device without
    classes (as is initialized by xf86-input-libinput for tablets) can
    legitimately return 0 and erroneously triggers an error.
    Fix this by using a separate value for the error.
    
    Reproducible by calling XListInputDevices() with a tablet attached.
    
    This fixes a regression introduced in commit 19a9cd607d.
    
    Signed-off-by: Niels Ole Salscheider <niels_ole at salscheider-online.de>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>



More information about the xorg-commit mailing list