Update to xf86-input-mouse 1.9.5

pull/1/head
matthieu 2023-07-03 07:28:53 +00:00
parent b19e0af9de
commit 214c231816
14 changed files with 5253 additions and 4317 deletions

View File

@ -1,5 +1,4 @@
Copyright (c) 2004-2005, 2008-2010, Oracle and/or its affiliates.
All rights reserved.
Copyright (c) 2004, 2022, Oracle and/or its affiliates.
Copyright 2012 Red Hat, Inc.
Permission is hereby granted, free of charge, to any person obtaining a

View File

@ -1,3 +1,71 @@
commit f59e8cb5b47fa989d3c9a0ca104d7261a94324db
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu May 4 17:17:54 2023 -0700
xf86-input-mouse 1.9.5
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit cad360554cdab324fc828cb5ffa47f610ca796c4
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Feb 25 09:07:15 2023 -0800
Remove "All rights reserved" from Oracle copyright notices
Oracle no longer includes this term in our copyright & license notices.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 52073e2edc29059a5142d4460c5edc8739981e03
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Nov 9 17:01:47 2022 -0800
sun_mouse: remove entry from vuidMouseList in DEVICE_CLOSE
Originally written by fei.feng@oracle.com to fix Oracle Bug 17429216:
"global vuidMouseList should not keep info for removed mouse device"
"During the testing for bug#17251473, I often see the mouse hang in X.
By debugging, I get that there seems something wrong in mouse_drv.so -
when a mouse is disconnected, the global vuidMouseList does not cleanup
the mouse's recorded info. So if a newly inserted mouse allocates a
input info pInfo which happens to have the same memory address as
previous pInfo, the driver would go wrong."
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit cd5b383c3f6c5b7ffa19f8e6ebb7d6551898a98b
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Nov 9 16:27:42 2022 -0800
sun_mouse: Add RelToAbs option to convert relative events to absolute
Enabled automatically for the Sun ILOM device, to avoid acceleration
that causes the Remote KVMS mouse cursor to become unaligned with the
X mouse cursor.
Code originally written by david.m.marx@oracle.com in 2013 to fix
Oracle bug 15798251 - SUNBT7177072 "actual mouse pointer is off from
the cursor on remote window"
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 5f63ab04338fd811c610ae7617757ede52471316
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Nov 2 14:45:25 2022 -0700
sun_mouse: include more required system headers
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit b99e91aafb66790d3158c068c321e40c19c0571d
Author: Thomas Klausner <wiz@gatalith.at>
Date: Wed Nov 2 09:11:33 2022 +0100
Rearrange includes to fix build on OmniOS. Include unistd.h for ioctl(2).
Signed-off-by: Thomas Klausner <wiz@gatalith.at>
commit ecd043f1de248cc03d240f1ae5850ce4f9f159a4
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue Nov 1 19:30:06 2022 -0700

View File

@ -209,7 +209,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@

View File

@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
[m4_warning([this file was generated for autoconf 2.69.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
@ -11610,7 +11610,7 @@ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
# These are currently disabled because they are noisy. They will be enabled

View File

@ -9,12 +9,15 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <minix/config.h> header file. */
#undef HAVE_MINIX_CONFIG_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@ -36,6 +39,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
@ -70,40 +76,98 @@
/* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
/* Enable general extensions on macOS. */
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable X/Open compliant socket functions that do not require linking
with -lxnet on HP-UX 11.11. */
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
# undef _HPUX_ALT_XOPEN_SOCKET_API
#endif
/* Identify the host operating system as Minix.
This macro does not affect the system headers' behavior.
A future release of Autoconf may stop defining this macro. */
#ifndef _MINIX
# undef _MINIX
#endif
/* Enable general extensions on NetBSD.
Enable NetBSD compatibility extensions on Minix. */
#ifndef _NETBSD_SOURCE
# undef _NETBSD_SOURCE
#endif
/* Enable OpenBSD compatibility extensions on NetBSD.
Oddly enough, this does nothing on OpenBSD. */
#ifndef _OPENBSD_SOURCE
# undef _OPENBSD_SOURCE
#endif
/* Define to 1 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_SOURCE
# undef _POSIX_SOURCE
#endif
/* Define to 2 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_1_SOURCE
# undef _POSIX_1_SOURCE
#endif
/* Enable POSIX-compatible threading on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
# undef __STDC_WANT_IEC_60559_BFP_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
# undef __STDC_WANT_IEC_60559_DFP_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
#endif
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
#ifndef __STDC_WANT_LIB_EXT2__
# undef __STDC_WANT_LIB_EXT2__
#endif
/* Enable extensions specified by ISO/IEC 24747:2009. */
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
# undef __STDC_WANT_MATH_SPEC_FUNCS__
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable X/Open extensions. Define to 500 only if necessary
to make mbstate_t available. */
#ifndef _XOPEN_SOURCE
# undef _XOPEN_SOURCE
#endif
/* Version number of package */
#undef VERSION
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-input-mouse],
[1.9.4],
[1.9.5],
[https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse/-/issues],
[xf86-input-mouse])
AC_CONFIG_SRCDIR([Makefile.am])

View File

@ -129,7 +129,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, Oracle and/or its affiliates.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),

View File

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC
scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written
# from scratch.
tab=' '
nl='
'
IFS=" "" $nl"
IFS=" $tab$nl"
# set DOITPROG to echo to test this script
# Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@ -68,22 +64,16 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
@ -97,7 +87,7 @@ dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@ -114,18 +104,28 @@ Options:
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-C install only if different (preserve data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-p pass -p to $cpprog.
-s $stripprog installed files.
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
By default, rm is invoked with -f; when overridden with RMPROG,
it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
Email bug reports to bug-automake@gnu.org.
Automake home page: https://www.gnu.org/software/automake/
"
while test $# -ne 0; do
@ -137,46 +137,62 @@ while test $# -ne 0; do
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
case $mode in
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
shift;;
-p) cpprog="$cpprog -p";;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-S) backupsuffix="$2"
shift;;
-T) no_target_directory=true;;
-t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
@ -207,6 +223,15 @@ if test $# -eq 0; then
exit 0
fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
@ -223,16 +248,16 @@ if test -z "$dir_arg"; then
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
u_plus_rw=
else
u_plus_rw='% 200'
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
u_plus_rw=
else
u_plus_rw=,u+rw
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@ -250,6 +275,10 @@ do
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
# Don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@ -266,178 +295,148 @@ do
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
# If destination is a directory, append the input filename.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
posix_mkdir=false
# The $RANDOM variable is not portable (e.g., dash). Use it
# here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
trap '
ret=$?
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
mkdir_mode=
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
trap '' 0;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set -f
set fnord $dstdir
shift
$posix_glob set +f
set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
@ -450,14 +449,25 @@ do
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
dsttmp=${dstdirslash}_inst.$$_
rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
(umask $cp_umask &&
{ test -z "$stripcmd" || {
# Create $dsttmp read-write so that cp doesn't create it read-only,
# which would cause strip to fail.
if test -z "$doit"; then
: >"$dsttmp" # No need to fork-exec 'touch'.
else
$doit touch "$dsttmp"
fi
}
} &&
$doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@ -472,20 +482,24 @@ do
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# If $backupsuffix is set, and the file being installed
# already exists, attempt a backup. Don't worry if it fails,
# e.g., if mv doesn't support -f.
if test -n "$backupsuffix" && test -f "$dst"; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
fi
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@ -493,24 +507,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
@ -519,9 +533,9 @@ do
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2005, Oracle and/or its affiliates.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),

View File

@ -15,7 +15,7 @@
@SET_MAKE@
#
# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2005, Oracle and/or its affiliates.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@ -149,7 +149,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@

View File

@ -183,7 +183,6 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@

View File

@ -1,6 +1,5 @@
/*
* Copyright (c) 2004-2005, 2008-2010, Oracle and/or its affiliates.
* All rights reserved.
* Copyright (c) 2004, 2022, Oracle and/or its affiliates.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -55,6 +54,12 @@
#include <xorg-config.h>
#endif
#include <unistd.h> /* for ioctl(2) */
#include <sys/stropts.h>
#include <sys/vuid_event.h>
#include <sys/msio.h>
#include <fcntl.h>
#include <errno.h>
#include "xorg-server.h"
#include "xf86.h"
#include "xf86_OSlib.h"
@ -62,9 +67,6 @@
#include "xisb.h"
#include "mipointer.h"
#include "xf86Crtc.h"
#include <sys/stropts.h>
#include <sys/vuid_event.h>
#include <sys/msio.h>
/* Wheel mouse support in VUID drivers in Solaris 9 updates & Solaris 10 */
#ifdef WHEEL_DEVID /* Defined in vuid_event.h if VUID wheel support present */
@ -74,6 +76,8 @@
# include <sys/vuid_wheel.h>
#endif
#include <libdevinfo.h>
/* Support for scaling absolute coordinates to screen size in
* Solaris 10 updates and beyond */
#if !defined(HAVE_ABSOLUTE_MOUSE_SCALING)
@ -109,6 +113,9 @@ typedef struct _VuidMseRec {
Ms_screen_resolution absres;
#endif
OsTimerPtr remove_timer; /* Callback for removal on ENODEV */
int relToAbs;
int absX;
int absY;
} VuidMseRec, *VuidMsePtr;
static VuidMsePtr vuidMouseList = NULL;
@ -116,6 +123,9 @@ static VuidMsePtr vuidMouseList = NULL;
static int vuidMouseProc(DeviceIntPtr pPointer, int what);
static void vuidReadInput(InputInfoPtr pInfo);
static int CheckRelToAbs(InputInfoPtr pInfo);
static int CheckRelToAbsWalker(di_node_t node, void *arg);
#ifdef HAVE_ABSOLUTE_MOUSE_SCALING
# include "compat-api.h"
@ -224,6 +234,11 @@ vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
pVuidMse->buffer = (unsigned char *)&pVuidMse->event;
pVuidMse->strmod = xf86SetStrOption(pInfo->options, "StreamsModule", NULL);
pVuidMse->relToAbs = xf86SetIntOption(pInfo->options, "RelToAbs", -1);
if (pVuidMse->relToAbs == -1)
pVuidMse->relToAbs = CheckRelToAbs(pInfo);
pVuidMse->absX = 0;
pVuidMse->absY = 0;
/* Setup the local procs. */
pVuidMse->wrapped_device_control = pInfo->device_control;
@ -245,6 +260,120 @@ vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
return TRUE;
}
/*
* It seems that the mouse that is presented by the Emulex ILOM
* device (USB 0x430, 0xa101 and USB 0x430, 0xa102) sends relative
* mouse movements. But relative mouse movements are subject to
* acceleration. This causes the position indicated on the ILOM
* window to not match what the Xorg server actually has. This
* makes the mouse in this environment rather unusable. So, for the
* Emulex ILOM device, we will change all relative mouse movements
* into absolute mouse movements, making it appear more like a
* tablet. This will not be subject to acceleration, and this
* should keep the ILOM window and Xorg server with the same values
* for the coordinates of the mouse.
*/
typedef struct reltoabs_match {
int matched;
char const *matchname;
} reltoabs_match_t;
/* Sun Microsystems, keyboard / mouse */
#define RELTOABS_MATCH1 "usbif430,a101.config1.1"
/* Sun Microsystems, keyboard / mouse / storage */
#define RELTOABS_MATCH2 "usbif430,a102.config1.1"
static int
CheckRelToAbsWalker(di_node_t node, void *arg)
{
di_minor_t minor;
char *path;
int numvalues;
int valueon;
char const *stringptr;
int status;
reltoabs_match_t *const matchptr = (reltoabs_match_t *)arg;
char *stringvalues;
for (minor = di_minor_next(node, DI_MINOR_NIL);
minor != DI_MINOR_NIL;
minor = di_minor_next(node, minor)) {
path = di_devfs_minor_path(minor);
status = path != NULL && strcmp(path, matchptr -> matchname) == 0;
di_devfs_path_free(path);
if (status)
break;
}
if (minor == DI_MINOR_NIL)
return (DI_WALK_CONTINUE);
numvalues = di_prop_lookup_strings(DDI_DEV_T_ANY, node,
"compatible", &stringvalues);
if (numvalues <= 0)
return (DI_WALK_CONTINUE);
for (valueon = 0, stringptr = stringvalues; valueon < numvalues;
valueon++, stringptr += strlen(stringptr) + 1) {
if (strcmp(stringptr, RELTOABS_MATCH1) == 0) {
matchptr -> matched = 1;
return (DI_WALK_TERMINATE);
}
if (strcmp(stringptr, RELTOABS_MATCH2) == 0) {
matchptr -> matched = 2;
return (DI_WALK_TERMINATE);
}
}
return (DI_WALK_CONTINUE);
}
static int
CheckRelToAbs(InputInfoPtr pInfo)
{
char const *device;
char const *matchname;
ssize_t readstatus;
di_node_t node;
struct stat statbuf;
char linkname[512];
reltoabs_match_t reltoabs_match;
device = xf86CheckStrOption(pInfo->options, "Device", NULL);
if (device == NULL)
return (0);
matchname = device;
if (lstat(device, &statbuf) == 0 &&
(statbuf.st_mode & S_IFMT) == S_IFLNK) {
readstatus = readlink(device, linkname, sizeof(linkname));
if (readstatus > 0 && readstatus < (ssize_t) sizeof(linkname)) {
linkname[readstatus] = 0;
matchname = linkname;
if (strncmp(matchname, "../..", sizeof("../..") - 1) == 0)
matchname += sizeof("../..") - 1;
}
}
if (strncmp(matchname, "/devices", sizeof("/devices") - 1) == 0)
matchname += sizeof("/devices") - 1;
reltoabs_match.matched = 0;
reltoabs_match.matchname = matchname;
node = di_init("/", DINFOCPYALL);
if (node == DI_NODE_NIL)
return (0);
di_walk_node(node, DI_WALK_CLDFIRST, (void *)&reltoabs_match,
CheckRelToAbsWalker);
di_fini(node);
return (reltoabs_match.matched != 0);
}
static void
vuidFlushAbsEvents(InputInfoPtr pInfo, int absX, int absY,
Bool *absXset, Bool *absYset)
@ -287,7 +416,9 @@ vuidReadInput(InputInfoPtr pInfo)
ssize_t n;
unsigned char *pBuf;
int absX = 0, absY = 0;
int hdisplay = 0, vdisplay = 0;
Bool absXset = FALSE, absYset = FALSE;
int relToAbs;
pMse = pInfo->private;
buttons = pMse->lastButtons;
@ -297,6 +428,18 @@ vuidReadInput(InputInfoPtr pInfo)
return;
}
pBuf = pVuidMse->buffer;
relToAbs = pVuidMse->relToAbs;
if (relToAbs) {
ScreenPtr pScreen = miPointerGetScreen(pInfo->dev);
ScrnInfoPtr pScr = XF86SCRNINFO(pScreen);
if (pScr->currentMode) {
hdisplay = pScr->currentMode->HDisplay;
vdisplay = pScr->currentMode->VDisplay;
}
absX = pVuidMse->absX;
absY = pVuidMse->absY;
}
do {
n = read(pInfo->fd, pBuf, sizeof(Firm_event));
@ -356,10 +499,34 @@ vuidReadInput(InputInfoPtr pInfo)
int delta = pVuidMse->event.value;
switch(pVuidMse->event.id) {
case LOC_X_DELTA:
dx += delta;
if (!relToAbs)
dx += delta;
else {
if (absXset)
vuidFlushAbsEvents(pInfo, absX, absY, &absXset, &absYset);
absX += delta;
if (absX < 0)
absX = 0;
else if (absX >= hdisplay && hdisplay > 0)
absX = hdisplay - 1;
pVuidMse->absX = absX;
absXset = TRUE;
}
break;
case LOC_Y_DELTA:
dy -= delta;
if (!relToAbs)
dy -= delta;
else {
if (absYset)
vuidFlushAbsEvents(pInfo, absX, absY, &absXset, &absYset);
absY -= delta;
if (absY < 0)
absY = 0;
else if (absY >= vdisplay && vdisplay > 0)
absY = vdisplay - 1;
pVuidMse->absY = absY;
absYset = TRUE;
}
break;
case LOC_X_ABSOLUTE:
if (absXset) {
@ -575,8 +742,21 @@ vuidMouseProc(DeviceIntPtr pPointer, int what)
}
break;
case DEVICE_OFF:
case DEVICE_CLOSE:
if (vuidMouseList == pVuidMse)
vuidMouseList = vuidMouseList->next;
else {
VuidMsePtr m = vuidMouseList;
while ((m != NULL) && (m->next != pVuidMse)) {
m = m->next;
}
if (m != NULL)
m->next = pVuidMse->next;
}
/* fallthrough */
case DEVICE_OFF:
if (pInfo->fd != -1) {
if (pVuidMse->strmod) {
SYSCALL(i = ioctl(pInfo->fd, I_POP, pVuidMse->strmod));