Commit Graph

250 Commits

Author SHA1 Message Date
Patrik Jakobsson
ea504b225f Add AC_SYSTEM_EXTENSIONS to expose asprintf with GNU libc
As required by the following commit:
commit 8c75f6e1c1
Use asprintf (or Xprintf on old servers) instead of strdup+sprintf

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-01-05 10:26:32 -08:00
Alan Coopersmith
8c75f6e1c1 Use asprintf (or Xprintf on old servers) instead of strdup+sprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-03 10:48:07 -08:00
Alan Coopersmith
d5de178fe9 Wrap some overly long lines
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-10-19 18:40:10 -07:00
Peter Hutterer
35cae8f435 mouse 1.9.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-mouse-1.9.0
2013-03-27 10:59:05 +10:00
Colin Walters
585f4030d7 autogen.sh: Implement GNOME Build API
http://people.gnome.org/~walters/docs/build-api.txt

Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-01-16 13:16:23 -05:00
Adam Jackson
8e74b1db7b configure: Drop AM_MAINTAINER_MODE
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-01-16 13:11:11 -05:00
Peter Hutterer
3b199a175d Use signal-safe logging if available
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
2012-10-08 11:40:07 +10:00
Peter Hutterer
cb1f60930b Fix compilation error with EXTMOUSEDEBUG on
pInfo->atom was removed in xorg-server-1.9.0-26-g9802cca

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-08-17 14:38:37 +10:00
Peter Hutterer
29dbd85c46 xf86-input-mouse 1.8.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-mouse-1.8.1
2012-07-31 09:39:47 +10:00
Alan Coopersmith
5a5f41659d Fix compiler warning in sun_mouse.c (Solaris-only)
sun_mouse.c: In function 'vuidRemoveMouse':
sun_mouse.c:150:42: warning: declaration of 'time' shadows a global declaration

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-07-31 09:37:58 +10:00
Peter Hutterer
5748979008 Rename xf86-mouse.pc to xorg-mouse.pc
Other input drivers already shipping pkgconfig files use this naming scheme
and since the 1.8 release didn't install the file anyway, renaming is still
acceptable at this point.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-31 09:06:41 +10:00
Peter Hutterer
a5630a5668 Install xf86-mouse.pc file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-31 09:06:41 +10:00
Peter Hutterer
7c1e63ef00 Fix compiler warnings
pnp.c: In function 'probePs2ProtocolPnP':
pnp.c:711:31: warning: declaration of 'seq' shadows a previous local
[-Wshadow]
pnp.c:705:23: warning: shadowed declaration is here [-Wshadow]

mouse.c: In function 'MouseCommonOptions':
mouse.c:330:13: warning: declaration of 'i' shadows a previous local
[-Wshadow]
mouse.c:279:9: warning: shadowed declaration is here [-Wshadow]

mouse.c: In function 'autoProbeMouse':
mouse.c:3602:29: warning: declaration of 'proto' shadows a global
declaration [-Wshadow]
mouse.c:2482:22: warning: shadowed declaration is here [-Wshadow]

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-30 13:36:44 -07:00
Alan Coopersmith
3c0c022672 xf86-input-mouse 1.8.0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
xf86-input-mouse-1.8.0
2012-07-26 23:10:47 -07:00
Alan Coopersmith
66792aff95 Fix vuidMouseAdjustFrame to build with Xorg 1.13 ABI
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-25 22:12:02 -07:00
Alan Coopersmith
a2494e6fe3 Raise bar for xorg-server to 1.7 for XINPUT ABI 7
Not all of the button label settings were wrapped in ABI #ifdefs,
so just drop all #ifdefs for GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 7

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-07-24 18:53:33 -07:00
Alan Coopersmith
88e90dde7a Expand tabs to spaces
Existing code had a mix of places tab & space characters were used.
Make them all spaces for consistency, since that's the new style
chosen for xorg-server.

"git diff -w" shows no changes - this is pure whitespace adjustment.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-04-30 20:38:33 -07:00
Alan Coopersmith
580e739de0 Strip trailing whitespace
cleanup done via: perl -p -i -e 's/[\t ]*$//'
"git diff -w" shows no changes - this is pure whitespace adjustment.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-04-30 20:38:29 -07:00
Alan Coopersmith
1816cd9198 Add settable properties for middle mouse button emulation
Based on evdev's similar properties, including using the name "middle"
button, to avoid confusion with evdev's 3rd button emulation for
emulating the right button on a single button mouse.

Allows manual enable & disable at runtime.

Exports new xf86-mouse.pc & xf86-mouse-properties.h for property name
definitions.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-30 20:15:56 -07:00
Alan Coopersmith
84090b15ea Set button & axis labels
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-30 20:15:52 -07:00
Alan Coopersmith
4b6738c840 Set XI_PROP_DEVICE_NODE property to string from "Device" option
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-30 20:15:48 -07:00
Alan Coopersmith
5583a77bba sun_mouse.c: Remove redundant option checks
Previously they checked pInfo->options, then fell back to
pInfo->conf_idev->commonOptions - but then 7bf22a368c
replaced the latter with the former, resulting in some redunancy.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Alexandr Shadchin <alexandr.shadchin@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-30 20:15:16 -07:00
Alan Coopersmith
80d724d13a xf86-input-mouse 1.7.2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
xf86-input-mouse-1.7.2
2012-03-15 23:34:21 -07:00
Alan Coopersmith
68a1e2f74d sun_mouse.c: remove unused variables
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-22 20:55:45 -08:00
Alan Coopersmith
a5126694b2 Mark symtab_t.name in pnp.c as const to fix gcc -Wwrite-strings warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-22 20:54:14 -08:00
Alan Coopersmith
8bc8502c69 Avoid NULL pointer dereference in autoProbeMouse if proto == PROT_UNSUP
Error: Null pointer dereference (CWE 476)
   Read from null pointer 'GetProtocol(proto)'
        at line 3477 of src/mouse.c in function 'autoProbeMouse'.
          Function 'GetProtocol' may return constant 'NULL' at line 736, called at line 3477.
          Null pointer introduced at line 736 in function 'GetProtocol'.

We already handle one of the two cases that make GetProtocol return NULL,
proto == PROTO_UNKNOWN, but not PROT_UNSUP.

[ This bug was found by the Parfait 0.4.2 bug checking tool.
  For more information see http://labs.oracle.com/projects/parfait/ ]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Alexandr Shadchin <alexandr.shadchin@gmail.com>
2011-12-05 17:45:02 -08:00
Alexandr Shadchin
b65651974e Fix wrong read Protocol and Device from xorg.conf
Add call xf86CollectInputOptions() before using pInfo->options.
The bug is seeing by ABI < 12.

Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-08-22 08:14:03 +10:00
Alan Coopersmith
7bb5cbecbc sun_mouse.c: Ensure vuidMouse setup routines are called for protocol "Auto"
Fixes regression caused by commit b12fa0d5ab in which devices with
protocol "Auto" (generally just PS/2 devices on Solaris, since HAL
sets protocol "VUID" for USB devices already) weren't going through
vuidMousePreInit and setting up the device_control & read_input pointers
to the routines which know how to decode VUID packets.

Adds a check to vuidPreInit to ensure we don't leak memory if called
twice for the same device, just in case I missed a code path, or a
new one appears in the future.

Fixes Solaris bug 7070321: Mouse protocol "Auto" does not work in build 170

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-07-27 18:02:10 -07:00
Alan Coopersmith
94fb2250b1 No need to merge NULL options list with existing options
Appending NULL to an existing options list simply walks the entire
existing list before returning it unchanged, so if we aren't creating
a new list to merge, don't bother merging it either.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-07-27 18:01:57 -07:00
Terry Lambert
93ebeecdda xf86-input-mouse: Return proper default for unknown values in pInfo->device_control.
Signed-off-by: Terry Lambert <tlambert@chromium.org>
Reviewed-by: Stephane Marchesin <marcheu@chromium.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-07-18 11:35:17 +10:00
Alan Coopersmith
9f969bd4d1 xf86-input-mouse 1.7.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
xf86-input-mouse-1.7.1
2011-07-05 09:09:26 -07:00
Alan Coopersmith
b12fa0d5ab Fix Solaris issues with new ABI12 init process.
Based on BSD changes in commit a22879c677
by Alexandr Shadchin

Fix segfaults when mouse device fails to open.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-27 08:45:00 +10:00
Samuel Thibault
1780667854 Fix Hurd mouse driver with XInput ABI before 12
Commit 7bf22a36 (Use pInfo->options instead of conf-idev.) updated the
xf86CollectInputOptions call into keeping previous options (for ABI before
12). The hurd mouse driver also needs to be updated.
2011-03-30 02:26:25 +02:00
Samuel Thibault
d6e9623875 Fix OSMouse OS-defined protocol support
Fix regression introduced by 0a088df6: in the case of an OS-specific
protocol, the protocol is PROT_UNKNOWN, but should not be rejected: the core
mouse drive just needs to let the OS driver handle it.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2011-03-30 01:00:47 +02:00
Peter Hutterer
a07c353f01 mouse 1.7.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-mouse-1.7.0
2011-03-10 08:32:23 +10:00
Alexandr Shadchin
a22879c677 Fix BSD issues with new ABI12 init process.
From Bug 34794:
"Until xf86-input-mouse-1.6.0, the MousePreInit() function exited if an
os specific PreInit function existed. It let the os-specific function finish
all initialisations that remained to be done after osInfo->PreInit() was
called.

The code in master now continues, and does things that the bsdMousePreInit()
function in bsd_mouse.c doesn't expect."

Fix up wsconsPreInit to deal with the new init process.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=34794

Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-10 08:31:19 +10:00
Peter Hutterer
2e507df670 mouse 1.6.99.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-mouse-1.6.99.901
2011-02-21 10:50:39 +10:00
Peter Hutterer
70f1d8579e man: ClearDTR and ClearRTS are handled by the X server.
If it breaks, we know who to blame (or file a bug against).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
2011-02-21 10:50:39 +10:00
Peter Hutterer
194c5913e9 man: protocol option isn't mandatory, it's platform-specific.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
2011-02-21 10:50:39 +10:00
Peter Hutterer
f70a9817a2 man: fix typo "Auto platform" → "Auto protocol"
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
2011-02-21 10:50:39 +10:00
Peter Hutterer
a45b5d0eaf man: README.mouse is just README
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
2011-02-21 10:50:39 +10:00
Peter Hutterer
9140e26403 man: add mention of xorg.conf.d snippet
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
2011-02-21 10:50:39 +10:00
Peter Hutterer
af784aad33 man: remove mention of core pointer.
This doesn't apply to X servers 1.7 and later.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
2011-02-21 10:50:39 +10:00
Alan Coopersmith
6b5a82e4e8 Add ABI checks around XI86_CONFIGURED uses in OS-specific PreInits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-30 14:51:03 -08:00
Peter Hutterer
73bb42e100 Bump to 1.6.99
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-25 11:35:29 +10:00
Peter Hutterer
0a088df6b2 Adjust to new Input ABI 12.
New PreInit prototype and a couple of other minor changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-11-18 11:36:15 +10:00
Peter Hutterer
fedd52ba78 ABI 12 requires per-valuator modes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-11-18 11:35:46 +10:00
Peter Hutterer
7bf22a368c Use pInfo->options instead of conf-idev.
Because it doesn't really matter anyway, I think.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-11-18 11:35:42 +10:00
Peter Hutterer
f3f405db56 Remove write-only field mouseFlags.
The flags were used to store ClearDTS and ClearRTR, but those options only
resulted in log messages.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-26 06:34:20 +10:00
Peter Hutterer
23308a251e Rename xf86OSMouseInit to OSMouseInit.
This isn't a DDX function anymore.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-26 06:34:05 +10:00