Not needed by mouse driver, but quiets warnings from xorg server headers:
In file included from /usr/include/xorg/misc.h:117:0,
from /usr/include/xorg/xf86str.h:37,
from /usr/include/xorg/xf86.h:44,
from mouse.c:57:
/usr/include/xorg/os.h:595:1: warning: redundant redeclaration of ‘timingsafe_memcmp’ [-Wredundant-decls]
timingsafe_memcmp(const void *b1, const void *b2, size_t len);
^~~~~~~~~~~~~~~~~
In file included from mouse.c:52:0:
/usr/include/string.h:235:12: note: previous declaration of ‘timingsafe_memcmp’ was here
extern int timingsafe_memcmp(const void *s1, const void *s2, size_t n);
^~~~~~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
mouse.c: In function ‘autoGood’:
mouse.c:3724:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (mPriv->goodCount < PROBE_UNCERTAINTY/2)
^
mouse.c:3726:5: note: here
default:
^~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
mouse.c:185:1: warning: missing initializer for field ‘default_options’ of ‘InputDriverRec {aka struct _InputDriverRec}’ [-Wmissing-field-initializers]
};
^
In file included from mouse.c:63:0:
/usr/include/xorg/xf86Xinput.h:83:18: note: ‘default_options’ declared here
const char **default_options;
^~~~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
mouse.c: In function ‘SetupMouse’:
mouse.c:2620:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < sizeof(pMse->protoPara); i++)
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
mouse.c: In function ‘checkForErraticMovements’:
mouse.c:3759:52: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
AP_DBG(("accDx=%i\n",mPriv->accDx));
^
mouse.c:3772:52: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
AP_DBG(("accDy=%i\n",mPriv->accDy));
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
sun_mouse.c: In function ‘vuidReadInput’:
sun_mouse.c:299:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
} else if (n == -1) {
^~
sun_mouse.c: In function ‘vuidMouseProc’:
sun_mouse.c:507:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (vuidMouseGeneration != serverGeneration) {
^~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
The block and wakeup handler API is changing so that the FD_SET type
isn't visible outside the OS layer anymore. The mouse driver didn't
need that argument anyways, so the change is just to adjust the APIs
to avoid compiler warnings.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This makes using input_lock/input_unlock conditional on the ABI
version so that we don't get compiler warnings when compiling with the
newer server bits.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Not strictly needed in the xorg build, but helps the NetBSD reachover
build, and follows implicit conventions about pkg-config files more
closely.
See also http://gnats.netbsd.org/48991
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Currently on Solaris absolute input reporting only takes resolution changes
into account when the video driver is using the pre-RandR 1.2 APIs, and
there it uses the physical resolution, not the virtual. This patch fixes
those two things.
Signed-off-by: Michael Thayer <michael.thayer@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
In MousePickProtocol() with protocol PROT_AUTO we probe for the protocol to
use but drop the result in most cases. This was causing DEVICE_INIT and
DEVICE_ON to fail to be called with the VUID protocol. Git history suggests
that this code was originally meant to cover both PS/2 auto-detection and OS-
specific detection, but that only the first case was implemented at the time.
Now that only the second is needed dropping the result to keep the protocol
as PROT_AUTO is presumably no longer useful and seems to actively breaking
things.
Signed-off-by: Michael Thayer <michael.thayer@oracle.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
With a multiplexed device like wsmouse it does not make sense to
kill emulate3buttons on the first button-3-pressed event. The
button-3 pressed may belong to a mouse long gone and leave the
internal (two button only) mousepad useless.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
From Martin Husemann <martin@NetBSD.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
This makes sure that the xserver and the mouse speak the same
protocol version.
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
From Matthew R. Green <mrg@NetBSD.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
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>
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>
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>