]> diplodocus.org Git - xorg-xinput/log
xorg-xinput
12 years agoMerge branch 'test-root-flag'
Peter Hutterer [Mon, 15 Jul 2013 05:02:55 +0000 (15:02 +1000)]
Merge branch 'test-root-flag'

12 years agotest-xi2: add support for test-xi2 --root
Peter Hutterer [Sun, 10 Mar 2013 05:22:25 +0000 (15:22 +1000)]
test-xi2: add support for test-xi2 --root

Select on the root window instead of a newly created one

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
12 years agotest-xi2: group event selection down
Peter Hutterer [Sun, 10 Mar 2013 05:07:17 +0000 (15:07 +1000)]
test-xi2: group event selection down

No real functional changes, just group the two selection requests together.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
12 years agotest-xi2: allocate both masks at the same time
Peter Hutterer [Sun, 10 Mar 2013 05:02:18 +0000 (15:02 +1000)]
test-xi2: allocate both masks at the same time

no functional changes for now, prep work for the --root flag

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
12 years agotest-xi2: drop unused grab code
Peter Hutterer [Sun, 10 Mar 2013 05:03:35 +0000 (15:03 +1000)]
test-xi2: drop unused grab code

Not sure why this code is still here

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
12 years agoUse setvbuf() instead of setlinebuf()
Jon TURNEY [Mon, 1 Jul 2013 17:36:28 +0000 (18:36 +0100)]
Use setvbuf() instead of setlinebuf()

setlinebuf() added in commit bcfa9123b41da8048450ed27aaeffff17b8eee99 is not in
SuS v3, use the exactly equivalent C89 setvbuf() invocation for portability

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
12 years agoAdd support for XINPUT_XI2_VERSION environment variable to override version
Peter Hutterer [Sun, 10 Mar 2013 05:25:38 +0000 (15:25 +1000)]
Add support for XINPUT_XI2_VERSION environment variable to override version

By default, xinput announces whatever version it was built against. For
debugging it can be useful to set this version on-the-fly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoIncrease interactiveness of test* output
Nikolai Kondrashov [Fri, 17 Aug 2012 10:29:10 +0000 (13:29 +0300)]
Increase interactiveness of test* output

Force line buffering for test and test_xi2 to increase interactiveness and
avoid losing data with non-terminal stdout. This fixes capturing xinput
test* output into a file.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agomap-to-output: implement reflections and rotations
Alon Levy [Sat, 9 Jun 2012 14:23:37 +0000 (17:23 +0300)]
map-to-output: implement reflections and rotations

Uses the rotation & translation currently set according to RandR.

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoFree strings allocated by GetAtomName instead of letting them leak
Alan Coopersmith [Fri, 1 Jun 2012 05:35:35 +0000 (22:35 -0700)]
Free strings allocated by GetAtomName instead of letting them leak

Fixes errors reported by Parfait 0.5.0.1 bug checking tool:

Error: Memory leak (CWE 401)
   Memory leak of pointer '<unknown>' allocated with XGetAtomName(dpy, info->type)
        at line 122 of src/list.c in function 'print_info'.
          pointer allocated at line 84 with XGetAtomName(dpy, info->type).
          <unknown> leaks when i >= info->num_classes at line 88.
Error: Memory leak (CWE 401)
   Memory leak of pointer '<unknown>' allocated with XGetAtomName(dpy, a)
        at line 160 of src/property.c in function 'print_property'.
          pointer allocated at line 131 with XGetAtomName(dpy, a).
   Memory leak of pointer '<unknown>' allocated with XGetAtomName(dpy, act_type)
        at line 160 of src/property.c in function 'print_property'.
          pointer allocated at line 143 with XGetAtomName(dpy, act_type).
   Memory leak of pointer 'name' allocated with XGetAtomName(dpy, property)
        at line 160 of src/property.c in function 'print_property'.
          'name' allocated at line 61 with XGetAtomName(dpy, property).
Error: Memory leak (CWE 401)
   Memory leak of pointer '<unknown>' allocated with XGetAtomName(dpy, a)
        at line 521 of src/property.c in function 'print_property_xi2'.
          pointer allocated at line 491 with XGetAtomName(dpy, a).
   Memory leak of pointer '<unknown>' allocated with XGetAtomName(dpy, act_type)
        at line 521 of src/property.c in function 'print_property_xi2'.
          pointer allocated at line 504 with XGetAtomName(dpy, act_type).
   Memory leak of pointer 'name' allocated with XGetAtomName(dpy, property)
        at line 521 of src/property.c in function 'print_property_xi2'.
          'name' allocated at line 428 with XGetAtomName(dpy, property).

Confirmed with Solaris Studio runtime checker that "list-props" now has
fewer leaks than before and "watch-props" no longer leaks a string every
time a property changes.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoxinput 1.6.0
Peter Hutterer [Tue, 15 May 2012 05:47:45 +0000 (15:47 +1000)]
xinput 1.6.0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 years agoAdd --enable/--disable support
Peter Hutterer [Mon, 14 May 2012 07:27:55 +0000 (17:27 +1000)]
Add --enable/--disable support

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
14 years agoxinput 1.5.99.901
Peter Hutterer [Mon, 16 Apr 2012 02:39:58 +0000 (12:39 +1000)]
xinput 1.5.99.901

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoPrint the sourceid for raw events
Peter Hutterer [Mon, 9 Apr 2012 23:28:36 +0000 (09:28 +1000)]
Print the sourceid for raw events

Due to http://bugs.freedesktop.org/show_bug.cgi?id=34240 this will display 0
for XI < 2.2 and libXi < 1.6.1.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
14 years agoHandle XA_CARDINAL as property type
Peter Hutterer [Tue, 21 Feb 2012 01:57:19 +0000 (11:57 +1000)]
Handle XA_CARDINAL as property type

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
14 years agoReplace NVIDIA-specific output checking
Peter Hutterer [Fri, 17 Feb 2012 04:34:23 +0000 (14:34 +1000)]
Replace NVIDIA-specific output checking

If the binary driver drives at least one screen, the old method did
not allow for randr-style screen binding (on the other screen).

Change the logic to:
- check if the output an randr output
- if not, check if the "default" randr output is present and the output name
  was "HEAD-n"
  - if so, use Xinerama-style mapping

This keeps the current behaviour of not allowing Xinerama-style mapping if
all outputs are RandR capable.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Aaron Plattner <aplattner@nvidia.com>
14 years agoAdd find_output_xrandr to check for output presence
Peter Hutterer [Fri, 17 Feb 2012 04:33:56 +0000 (14:33 +1000)]
Add find_output_xrandr to check for output presence

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoDon't leak output_info
Peter Hutterer [Fri, 17 Feb 2012 03:23:08 +0000 (13:23 +1000)]
Don't leak output_info

This inverts the logic to have a more obvious flow for freeing the
output_info.

==26716== 1,161 bytes in 8 blocks are definitely lost in loss record 5 of 7
==26716==    at 0x4A074CD: malloc (vg_replace_malloc.c:236)
==26716==    by 0x395D804ABA: XRRGetOutputInfo (in /usr/lib64/libXrandr.so.2.2.0)
==26716==    by 0x40932B: map_output_xrandr (transform.c:150)
==26716==    by 0x40982F: map_to_output (transform.c:263)
==26716==    by 0x4070A4: main (xinput.c:386)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoAlways call XCloseDisplay()
Peter Hutterer [Fri, 17 Feb 2012 03:19:42 +0000 (13:19 +1000)]
Always call XCloseDisplay()

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
14 years agoEnclose property and device names in quotes
Peter Hutterer [Fri, 17 Feb 2012 00:33:06 +0000 (10:33 +1000)]
Enclose property and device names in quotes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
14 years agoFix XRRCrtcInfo memory leaks
Peter Hutterer [Wed, 8 Feb 2012 10:46:29 +0000 (20:46 +1000)]
Fix XRRCrtcInfo memory leaks

crtc_info isn't used until later, move down to the block it is used to avoid
leaking.

Reported-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
14 years agoRename map-to-crtc to map-to-output
Peter Hutterer [Tue, 7 Feb 2012 08:20:37 +0000 (18:20 +1000)]
Rename map-to-crtc to map-to-output

xrandr uses "output", let's be consistent there.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
14 years agoxinput 1.5.99.1
Peter Hutterer [Thu, 12 Jan 2012 06:08:35 +0000 (16:08 +1000)]
xinput 1.5.99.1

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoMerge branch 'multitouch'
Peter Hutterer [Thu, 12 Jan 2012 06:01:28 +0000 (16:01 +1000)]
Merge branch 'multitouch'

14 years agoprint_version expects no arguments, so give it none
Alan Coopersmith [Thu, 22 Dec 2011 05:31:51 +0000 (21:31 -0800)]
print_version expects no arguments, so give it none

Fixes Solaris Studio compiler warning:
"xinput.c", line 357: warning: argument mismatch: 1 arg passed, 0 expected

gcc ignored it because the function declaration didn't specify arguments.
Once you specify (void) for the arguments, gcc then throws up:
xinput.c: In function ‘main’:
xinput.c:357:9: error: too many arguments to function ‘print_version’
xinput.c:147:1: note: declared here

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoPrint usage when run with --help
Jeremy Huddleston [Wed, 30 Nov 2011 07:52:53 +0000 (23:52 -0800)]
Print usage when run with --help

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Bryce Harrington <bryce@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoxinput: Assume 'list' by default if no args given.
Bryce Harrington [Wed, 30 Nov 2011 01:33:23 +0000 (17:33 -0800)]
xinput: Assume 'list' by default if no args given.

xrandr lists all outputs by default when run with no args.  So, make
xinput list all inputs by default when run the same way, so the tools
are consistent.

Signed-off-by: Bryce Harrington <bryce@canonical.com>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoadd support for touch raw events
Peter Hutterer [Wed, 2 Nov 2011 02:13:57 +0000 (12:13 +1000)]
add support for touch raw events

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agotest-xi2: check return value of list, exit on failure
Peter Hutterer [Wed, 26 Oct 2011 04:42:36 +0000 (14:42 +1000)]
test-xi2: check return value of list, exit on failure

If list() fails, the server doesn't support XI2 or the device is invalid. In
either case, exit.

Fixes crashes when a nonexisting device is given.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agotest-xi2: add basic touch support
Peter Hutterer [Tue, 25 Oct 2011 03:48:57 +0000 (13:48 +1000)]
test-xi2: add basic touch support

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agotest-xi2: Use the longest mask we can get
Peter Hutterer [Tue, 25 Oct 2011 03:45:34 +0000 (13:45 +1000)]
test-xi2: Use the longest mask we can get

Avoids ifdefs for touch events lateron

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoWe support XI 2.1 now
Peter Hutterer [Tue, 25 Oct 2011 22:03:20 +0000 (08:03 +1000)]
We support XI 2.1 now

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
14 years agolist: drop XIQueryVersion call
Peter Hutterer [Wed, 26 Oct 2011 23:46:27 +0000 (09:46 +1000)]
list: drop XIQueryVersion call

main() calls it for us before we get here, no need to have it twice.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
14 years agoMerge branch 'smooth-scrolling'
Peter Hutterer [Thu, 22 Sep 2011 22:36:47 +0000 (08:36 +1000)]
Merge branch 'smooth-scrolling'

Conflicts:
src/test_xi2.c

14 years agoSupport the new Scroll class
Peter Hutterer [Fri, 19 Aug 2011 03:07:57 +0000 (13:07 +1000)]
Support the new Scroll class

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
14 years agoOnly try to print XIPointerEmulated flag if it is defined.
Peter Hutterer [Tue, 23 Aug 2011 21:50:00 +0000 (07:50 +1000)]
Only try to print XIPointerEmulated flag if it is defined.

This flag is part of the future (currently unreleased) XI 2.1 protocol.
Introduced in 2c5187d0099e6c7588828ba9931d27f5c64bbaec

Reported-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
14 years agoEnclose button labels with quotes to improve readability
Peter Hutterer [Fri, 19 Aug 2011 05:24:30 +0000 (15:24 +1000)]
Enclose button labels with quotes to improve readability

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
14 years agotest-xi2: support a device option
Peter Hutterer [Fri, 19 Aug 2011 03:16:17 +0000 (13:16 +1000)]
test-xi2: support a device option

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
14 years agoPrint the class type when listing devices.
Peter Hutterer [Fri, 19 Aug 2011 03:11:04 +0000 (13:11 +1000)]
Print the class type when listing devices.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
14 years agotest-xi2: print the correct flags, depending on the event type
Peter Hutterer [Tue, 16 Aug 2011 01:39:02 +0000 (11:39 +1000)]
test-xi2: print the correct flags, depending on the event type

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
14 years agolist: don't use defines for checking server version.
Peter Hutterer [Fri, 12 Aug 2011 04:20:21 +0000 (14:20 +1000)]
list: don't use defines for checking server version.

Otherwise we run into the old problem again: recompiling xinput against
newer inputproto headers will appear to change the version support,
potentially causing errors or other misbehaviours.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
14 years agoAdd support for device-to-screen mapping
Peter Hutterer [Thu, 2 Jun 2011 00:20:42 +0000 (10:20 +1000)]
Add support for device-to-screen mapping

xinput map-to-crtc "device name" "VGA0" will map to the CRTC "VGA0" by
manipulating the transformation matrix accordingly. And because the NVIDIA
binary driver still exists, Xinerama is supported to. Maybe in another 5
years, they'll catch up.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
14 years agoman: Move my name to the top of the authors list
Peter Hutterer [Tue, 5 Jul 2011 22:38:50 +0000 (08:38 +1000)]
man: Move my name to the top of the authors list

It's reasonably likely that someone looking at the list of authors will
email the first one on the list. Let that be the current maintainer, it's
more likely that there will be the desired response.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
14 years agoman: update missing copyrights
Peter Hutterer [Tue, 5 Jul 2011 22:38:08 +0000 (08:38 +1000)]
man: update missing copyrights

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
14 years agoUpdate Copyright notices.
Gaetan Nadon [Mon, 20 Jun 2011 20:09:32 +0000 (16:09 -0400)]
Update Copyright notices.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoApply standard configuration init, layout and comments
Gaetan Nadon [Mon, 20 Jun 2011 20:09:31 +0000 (16:09 -0400)]
Apply standard configuration init, layout and comments

http://www.x.org/wiki/NewModuleGuidelines#Configurationfilescontentguidelines

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoRemove redundant definition of the VERSION Automake variable
Gaetan Nadon [Sat, 18 Jun 2011 18:41:34 +0000 (14:41 -0400)]
Remove redundant definition of the VERSION Automake variable

This variable is defined by Automake:
In config.status:
S["VERSION"]="1.5.3"
In config.h:

Reverts commit \58c513b0b9f6

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoMan pages Makefile: fix whitespace
Gaetan Nadon [Sat, 18 Jun 2011 18:41:35 +0000 (14:41 -0400)]
Man pages Makefile: fix whitespace

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoUse the value of MAN_SUBSTS from util-macros for man pages
Gaetan Nadon [Sat, 18 Jun 2011 18:41:31 +0000 (14:41 -0400)]
Use the value of MAN_SUBSTS from util-macros for man pages

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
14 years agoRemove superfluous comment.
Peter Hutterer [Thu, 2 Jun 2011 01:43:13 +0000 (11:43 +1000)]
Remove superfluous comment.

We can't remove this part if we want to keep working against 1.7 and 1.8.1.
No big deal, if this operation in xinput is the performance-critical path of
a system, things have gone bad a long time ago.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Julien Cristau <jcristau@debian.org>
14 years agoAnnounce support for XI 2.0 to the server.
Peter Hutterer [Wed, 1 Jun 2011 23:14:40 +0000 (09:14 +1000)]
Announce support for XI 2.0 to the server.

Technically, we're required to announce support for XI 2.0 through
XIQueryVersion. The behaviour of XI2 for clients that have not done so is
undefined, it just happens to work.

With XI 2.1 on the horizon, this may change so make sure we're clamining our
version correctly

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
14 years agoInitialize a few more values to defaults.
Peter Hutterer [Tue, 3 May 2011 07:05:45 +0000 (17:05 +1000)]
Initialize a few more values to defaults.

If we ever print <undefined> for those, we have a buggy X server that's
breaking the protocol. Until that happens this is just to shut up clang.

All three are assigned constant strings only, no free() needed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
14 years agoSilence compiler warning
Peter Hutterer [Tue, 3 May 2011 07:02:48 +0000 (17:02 +1000)]
Silence compiler warning

Static analysis claims that ptr += size may assign garbage. But since the
protocol requires format to be 8, 16 or 32, size should always have a valid
value. Initialize to 0 to shut up clang.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
15 years agoman: replace hard coded section number with __appmansuffix__
Gaetan Nadon [Sat, 5 Mar 2011 01:37:44 +0000 (20:37 -0500)]
man: replace hard coded section number with __appmansuffix__

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
15 years agoFix broken "xinput list <devicename>".
Peter Hutterer [Tue, 18 Jan 2011 03:20:58 +0000 (13:20 +1000)]
Fix broken "xinput list <devicename>".

Default behaviour for --list is to list --short if no device is given and
--long if a device is given. Restore this behaviour.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
Tested-by: Dirk Wallenstein <halsmit@t-online.de>
15 years agoAdd --id-only flag for 'xinput list'.
Peter Hutterer [Tue, 18 Jan 2011 03:02:20 +0000 (13:02 +1000)]
Add --id-only flag for 'xinput list'.

The default output of xinput list is hard to parse by scripts. Provide a
--id-only option to print the device ID only, without any other
information.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
Tested-by: Dirk Wallenstein <halsmit@t-online.de>
15 years agoAdd --name-only flag for 'xinput list'.
Peter Hutterer [Tue, 18 Jan 2011 02:55:46 +0000 (12:55 +1000)]
Add --name-only flag for 'xinput list'.

The default output of xinput list is hard to parse by scripts. Provide a
--name-only option to print the device name only, without any other
information.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
Tested-by: Dirk Wallenstein <halsmit@t-online.de>
15 years agoSwitch list to use an enum of printing formats.
Peter Hutterer [Tue, 18 Jan 2011 02:47:33 +0000 (12:47 +1000)]
Switch list to use an enum of printing formats.

Currently long and short, same as before. No functional changes, preparation
for further formats.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
Tested-by: Dirk Wallenstein <halsmit@t-online.de>
15 years agoconfig: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
Gaetan Nadon [Wed, 12 Jan 2011 21:28:02 +0000 (16:28 -0500)]
config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS

This silences an Autoconf warning

15 years agoconfig: remove unrequired AC_SUBST([*_LIBS])
Gaetan Nadon [Wed, 12 Jan 2011 20:12:08 +0000 (15:12 -0500)]
config: remove unrequired AC_SUBST([*_LIBS])

This macro is called by PKG_CHECK_MODULES

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
15 years agoconfig: remove unrequired AC_SUBST([*_CFLAGS])
Gaetan Nadon [Wed, 12 Jan 2011 18:33:48 +0000 (13:33 -0500)]
config: remove unrequired AC_SUBST([*_CFLAGS])

This macro is called by PKG_CHECK_MODULES

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
15 years agoconfig: remove AC_PROG_CC as it overrides AC_PROG_C_C99
Gaetan Nadon [Wed, 12 Jan 2011 18:10:21 +0000 (13:10 -0500)]
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>
15 years agoconfig: use AC_PROG_INSTALL now supplied by XORG_DEFAULT_OPTIONS
Gaetan Nadon [Wed, 12 Jan 2011 16:54:40 +0000 (11:54 -0500)]
config: use AC_PROG_INSTALL now supplied by XORG_DEFAULT_OPTIONS

It depends on util-macros 1.8 or later
The existing statement can now be removed from the configuration file.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
15 years agoconfig: use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
Gaetan Nadon [Wed, 12 Jan 2011 16:46:04 +0000 (11:46 -0500)]
config: use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS

It depends on util-macros 1.8 or later
The existing statement can now be removed from the configuration file.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
15 years agoconfig: upgrade to util-macros 1.8 for additional man page support
Gaetan Nadon [Wed, 12 Jan 2011 16:23:52 +0000 (11:23 -0500)]
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.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
15 years agoconfig: update AC_PREREQ statement to 2.60
Gaetan Nadon [Wed, 12 Jan 2011 15:21:24 +0000 (10:21 -0500)]
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 in one pass is 2.60 dated June 2006.

A version later than 2.60 can be used, but no new features from such
a later version can be used in configure.ac.

Although the code in this module can be configured with a version earlier
than 2.60, most of code is now contained in macros from util-macros
which use features of version 2.60, at the present or in the future.

ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
15 years agoRemove unneeded include.
Peter Hutterer [Wed, 22 Dec 2010 02:57:00 +0000 (12:57 +1000)]
Remove unneeded include.

This include was added during the MPX/XI2 development cycle, likely when the
headers weren't in an acceptable state and clients needed stuff defined in
the proto headers. Normal clients shouldn't need the proto headers though
and xinput builds fine without it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
15 years agoFix typo in man page for the --test-xi2 option.
David Fries [Wed, 1 Dec 2010 16:39:12 +0000 (08:39 -0800)]
Fix typo in man page for the --test-xi2 option.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Philip Langdale <philipl@overt.org>
15 years agoZero out entire mask when selecting for different events
Chase Douglas [Wed, 17 Nov 2010 15:42:38 +0000 (10:42 -0500)]
Zero out entire mask when selecting for different events

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
15 years agoPrint XI2 device event child window in hex too
Chase Douglas [Fri, 12 Nov 2010 22:35:15 +0000 (17:35 -0500)]
Print XI2 device event child window in hex too

This fixes an obvious error in the current print formatting.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
15 years agoxinput 1.5.3
Peter Hutterer [Thu, 11 Nov 2010 03:56:22 +0000 (13:56 +1000)]
xinput 1.5.3

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
15 years agoPrint an error if mode is neither ABSOLUTE nor RELATIVE.
Peter Hutterer [Mon, 11 Oct 2010 03:46:54 +0000 (13:46 +1000)]
Print an error if mode is neither ABSOLUTE nor RELATIVE.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
15 years agoxinput: Split XI2 valuators and print index of events
Chase Douglas [Thu, 1 Jul 2010 22:36:42 +0000 (18:36 -0400)]
xinput: Split XI2 valuators and print index of events

XI2 events support bitmask selected valuators. When printing masked
events, we need to also print the index of the valuator value. This
change prints each valuator on its own line, prefixed by its index

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
15 years agolist: only check the last bit in the device mode.
Peter Hutterer [Wed, 9 Jun 2010 05:52:31 +0000 (15:52 +1000)]
list: only check the last bit in the device mode.

This works around a bug in X servers 1.7.x, 1.8.0 and 1.8.1 where the device
mode could sometimes be binary OR'd with the OutOfProximity flag. The result
was a value of 0b10 for relative and 0b11 for Absolute, both of which were
interpreted as relative by this code.

Affected is only the XIQueryDevice call, not the XListInputDevices call.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
15 years agoxinput 1.5.2
Peter Hutterer [Fri, 4 Jun 2010 01:11:03 +0000 (11:11 +1000)]
xinput 1.5.2

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
15 years agoAtoms from XIGetProperty are 32bits (#27657)
Kees Cook [Thu, 15 Apr 2010 04:19:48 +0000 (21:19 -0700)]
Atoms from XIGetProperty are 32bits (#27657)

A 32bit value must be dereferenced to correctly zero-extend an Atom
from XIGetProperty.  On 64bit systems, Atom is 64bits, so the final
Atom in a list will read garbage in the upper half of the Atom.

X.Org Bug 27657 <http://bugs.freedesktop.org/show_bug.cgi?id=27657>

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
15 years agoSupport pointer: and keyboard: prefices for XI2 device names
Will Thompson [Tue, 6 Apr 2010 10:26:39 +0000 (11:26 +0100)]
Support pointer: and keyboard: prefices for XI2 device names

I have a keyboard which is also a mouse, and shows up as two devices
with the same name. This patch allows me to reliably refer to the
pointer device.

Signed-off-by: Will Thompson <will.thompson@collabora.co.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
15 years agoWarn and fail if a device name is ambiguous.
Will Thompson [Thu, 1 Apr 2010 14:35:34 +0000 (15:35 +0100)]
Warn and fail if a device name is ambiguous.

The XI1 path bails out if the user specifies a device by name and there
is more than one device, but the XI2 path previously just silently chose
the first one. This patch makes it fail outright.

Signed-off-by: Will Thompson <will.thompson@collabora.co.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
15 years agotest-xi2: Print out the sourceid for enter/leave events.
Peter Hutterer [Thu, 29 Apr 2010 06:03:28 +0000 (16:03 +1000)]
test-xi2: Print out the sourceid for enter/leave events.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
16 years agoman: use automake silent rules
Yaakov Selkowitz [Fri, 2 Apr 2010 05:30:49 +0000 (00:30 -0500)]
man: use automake silent rules

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
16 years agoman: Use AC_PROG_SED to find sed
Yaakov Selkowitz [Fri, 2 Apr 2010 05:30:48 +0000 (00:30 -0500)]
man: Use AC_PROG_SED to find sed

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Acked-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
16 years agoxinput 1.5.1
Peter Hutterer [Mon, 15 Mar 2010 01:34:55 +0000 (11:34 +1000)]
xinput 1.5.1

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
16 years agotest-xi2: print event type name as well.
Peter Hutterer [Tue, 2 Mar 2010 04:07:40 +0000 (14:07 +1000)]
test-xi2: print event type name as well.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
16 years agoman: document XI2 options
Peter Hutterer [Thu, 4 Feb 2010 05:05:36 +0000 (15:05 +1000)]
man: document XI2 options

Document the options to modifiy the device hierarchy and change the
ClientPointer.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
16 years agoman: remove reference to XListInputDevices
Peter Hutterer [Sun, 10 Jan 2010 23:23:32 +0000 (09:23 +1000)]
man: remove reference to XListInputDevices

xinput --list uses XListInputDevices on XI1 servers and XIQueryDevice on XI2
servers. Also, who cares about that when reading the man page anyway...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Julien Cristau <jcristau@debian.org>
16 years agoClarify role of set-ptr-feedback
Simon Thum [Sun, 18 Oct 2009 13:10:56 +0000 (15:10 +0200)]
Clarify role of set-ptr-feedback

Signed-off-by: Simon Thum <simon.thum@gmx.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
16 years agoAdd Peter and Red Hat's copyright notices and licenses to COPYING
Julien Cristau [Sun, 29 Nov 2009 10:04:57 +0000 (11:04 +0100)]
Add Peter and Red Hat's copyright notices and licenses to COPYING

16 years agoMakefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
Gaetan Nadon [Thu, 26 Nov 2009 14:19:54 +0000 (09:19 -0500)]
Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES

Now that the INSTALL file is generated.
Allows running make maintainer-clean.

16 years agoINSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
Gaetan Nadon [Wed, 28 Oct 2009 18:09:08 +0000 (14:09 -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.

16 years agoDeploy the new XORG_DEFAULT_OPTIONS #24242
Gaetan Nadon [Tue, 27 Oct 2009 19:07:25 +0000 (15:07 -0400)]
Deploy the new XORG_DEFAULT_OPTIONS #24242

This macro aggregate a number of existing macros that sets commmon
X.Org components configuration options. It shields the configuration file from
future changes.

16 years agoMakefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
Gaetan Nadon [Tue, 27 Oct 2009 02:08:39 +0000 (22:08 -0400)]
Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432

ChangeLog filename is known to Automake and requires no further
coding in the makefile.

16 years ago.gitignore: use common defaults with custom section # 24239
Gaetan Nadon [Thu, 22 Oct 2009 16:34:15 +0000 (12:34 -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.

16 years agoThis is not a GNU project, so declare it foreign.
Jeremy Huddleston [Wed, 21 Oct 2009 19:47:20 +0000 (12:47 -0700)]
This is not a GNU project, so declare it foreign.

On Wed, 2009-10-21 at 13:36 +1000, Peter Hutterer wrote:
> On Tue, Oct 20, 2009 at 08:23:55PM -0700, Jeremy Huddleston wrote:
> > I noticed an INSTALL file in xlsclients and libXvMC today, and it
> > was quite annoying to work around since 'autoreconf -fvi' replaces
> > it and git wants to commit it.  Should these files even be in git?
> > Can I nuke them for the betterment of humanity and since they get
> > created by autoreconf anyways?
>
> See https://bugs.freedesktop.org/show_bug.cgi?id=24206

As an interim measure, replace AM_INIT_AUTOMAKE([dist-bzip2]) with
AM_INIT_AUTOMAKE([foreign dist-bzip2]). This will prevent the generation
of the INSTALL file. It is also part of the 24206 solution.

Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
16 years agoxinput 1.5.0
Peter Hutterer [Tue, 13 Oct 2009 05:25:19 +0000 (15:25 +1000)]
xinput 1.5.0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
16 years agoClean up --version, don't require a DISPLAY and display the server version too.
Peter Hutterer [Fri, 9 Oct 2009 05:28:34 +0000 (15:28 +1000)]
Clean up --version, don't require a DISPLAY and display the server version too.

version.c was removed, seemed a bit excessive for the 20 lines of code.
--version is integrated separate from the other commands now, checked before
opening the display. xinput now prints its own version in all cases, even if
the display is unavailable. If the display is available, it prints the
server version too. Example output:

$> xinput --version
xinput version 1.4.99.3
XI version on server: 2.0

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
16 years agoman: clean up the man page.
Peter Hutterer [Fri, 9 Oct 2009 05:07:30 +0000 (15:07 +1000)]
man: clean up the man page.

Several changes to the man page to tidy it up a bit:
- RCS tag removed
- synopsis shortened, OPTIONS section added instead
- "xinput" dropped before the option descriptions, options in manpage
  prefixed with '--'.
- device_name replaced with just device, since it may be a deviceid.
- Removed references to XI man page calls that some options use, it really
  doesn't matter to users what the underlying Xlib call is.
- mark set-int-prop and set-float-prop as deprecated in the man page.
- add --test_xi2 flag
- Added a few more authors.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
16 years agoRework 'xinput list' code
Thomas Jaeger [Wed, 7 Oct 2009 17:05:15 +0000 (13:05 -0400)]
Rework 'xinput list' code

* Drop the questionable --loop option
* Add a --long option (opposite of --short)
* Make --short the default if no device argument is given
* XI2: Make it possible to query a single device

Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>
squashed in a man page update for --short and --long.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
16 years agoBump to 1.4.99.3
Peter Hutterer [Thu, 24 Sep 2009 00:45:54 +0000 (10:45 +1000)]
Bump to 1.4.99.3

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
16 years agoUse __xorgversion__ instead of RCS $Date in man page header/footer
Alan Coopersmith [Tue, 22 Sep 2009 00:30:55 +0000 (17:30 -0700)]
Use __xorgversion__ instead of RCS $Date in man page header/footer

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
16 years agoUse do_set_prop for set_{atom,float,int}_prop
Julien Cristau [Tue, 15 Sep 2009 15:37:34 +0000 (17:37 +0200)]
Use do_set_prop for set_{atom,float,int}_prop

Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>