mirror of
https://github.com/openbsd/xenocara.git
synced 2025-12-12 04:09:15 +00:00
update to xset 1.1.0. tested by naddy@
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
This is a stub file. This package has not yet had its complete licensing
|
||||
information compiled. Please see the individual source files for details on
|
||||
your rights to use and modify this software.
|
||||
Copyright 1985, 1988, 1998 The Open Group
|
||||
|
||||
Please submit updated COPYING files to the Xorg bugzilla:
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
documentation for any purpose is hereby granted without fee, provided that
|
||||
the above copyright notice appear in all copies and that both that
|
||||
copyright notice and this permission notice appear in supporting
|
||||
documentation.
|
||||
|
||||
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
All licensing questions regarding this software should be directed at the
|
||||
Xorg mailing list:
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://lists.freedesktop.org/mailman/listinfo/xorg
|
||||
Except as contained in this notice, the name of The Open Group shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from The Open Group.
|
||||
|
||||
@@ -1,3 +1,87 @@
|
||||
commit 434c62e22aeed94b7b84ec613ba066ac6aa7c14b
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Mon Sep 21 15:48:57 2009 -0700
|
||||
|
||||
xset 1.1.0
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit dbd3a05ab990f5d2827b84ab81e7b1a19cd0b786
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Mon Sep 21 15:42:08 2009 -0700
|
||||
|
||||
Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 3341f135515f6f2e5b0c40f5ec0a8fb59d4cb1ed
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Tue Jun 16 16:34:15 2009 -0700
|
||||
|
||||
Fill in README & COPYING files
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 9ee8b074cb8f8de84aafebcc22c6c266371693ec
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Tue Jun 16 13:14:47 2009 -0700
|
||||
|
||||
XKB named indicator support for led state query/set
|
||||
|
||||
xset q now lists XKB named indicator states in addition to led bitmask
|
||||
Sample output:
|
||||
Keyboard Control:
|
||||
auto repeat: on key click percent: 0 LED mask: 0000000a
|
||||
XKB indicators:
|
||||
00: Caps Lock: off 01: Num Lock: on 02: Scroll Lock: off
|
||||
03: Compose: on 04: Shift Lock: off 05: Group 2: off
|
||||
06: Mouse Keys: off
|
||||
[...]
|
||||
|
||||
New options "xset led named <name>" and "xset -led named <name>" allow
|
||||
turning named leds/virtual indicators on & off.
|
||||
|
||||
('named' keyword is necessary to avoid ambiguity if an XKB indicator
|
||||
is given a numeric name or a name that matches an existing xkb option
|
||||
due to xset's horrible historic command line syntax model.)
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 8ce473c45da07eb82537509a4d14ccb50262bfa7
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Wed Apr 29 13:57:47 2009 -0700
|
||||
|
||||
Avoid warning from "xset r rate" when XF86Misc extension is not present
|
||||
|
||||
- Since XF86Misc is only used if XKB is not present, don't check for
|
||||
XF86Misc unless XKB is not present
|
||||
- If we do check for XF86Misc, use QueryExtension instead of QueryVersion
|
||||
to avoid Xlib printing missing extension warning message when it's not
|
||||
found (such as in Xorg 1.6 and later).
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 30833b82734fb2d77657b4672eaf622c30990471
|
||||
Author: Julien Cristau <jcristau@debian.org>
|
||||
Date: Tue Apr 28 16:11:56 2009 +0200
|
||||
|
||||
Fix typos in xset manpage
|
||||
|
||||
Debian bug#525255 <http://bugs.debian.org/525255>
|
||||
Reported-by: "A. Costa" <agcosta@gis.net>
|
||||
|
||||
commit 3d1146293d84cecaff18aa44b95539910e24ef11
|
||||
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
|
||||
Date: Mon Jan 26 18:03:23 2009 -0200
|
||||
|
||||
Correct make distcheck and most sparse warnings.
|
||||
|
||||
commit 9f79fc8957d595cc9f7131ee5230b5bb3aae0679
|
||||
Author: Adam Jackson <ajax@redhat.com>
|
||||
Date: Thu Mar 6 17:29:45 2008 -0500
|
||||
|
||||
xset 1.0.4
|
||||
|
||||
commit b6343fa846eeadb6736f383577b91dbb46d46971
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Tue Jan 15 18:11:25 2008 -0800
|
||||
|
||||
@@ -35,14 +35,14 @@ appmandir = $(APP_MAN_DIR)
|
||||
|
||||
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
|
||||
|
||||
EXTRA_DIST = $(appman_PRE) ChangeLog autogen.sh
|
||||
EXTRA_DIST = $(appman_PRE) ChangeLog
|
||||
CLEANFILES = $(appman_DATA)
|
||||
MAINTAINERCLEANFILES = ChangeLog
|
||||
|
||||
.PHONY: ChangeLog
|
||||
|
||||
ChangeLog:
|
||||
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
|
||||
$(CHANGELOG_CMD)
|
||||
|
||||
dist-hook: ChangeLog
|
||||
|
||||
|
||||
@@ -109,7 +109,6 @@ am__remove_distdir = \
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
|
||||
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
|
||||
@@ -125,7 +124,10 @@ AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CHANGELOG_CMD = @CHANGELOG_CMD@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CWARNFLAGS = @CWARNFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
@@ -134,9 +136,11 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FILE_MAN_DIR = @FILE_MAN_DIR@
|
||||
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
@@ -181,8 +185,6 @@ VERSION = @VERSION@
|
||||
XSET_CFLAGS = @XSET_CFLAGS@
|
||||
XSET_LIBS = @XSET_LIBS@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
@@ -197,23 +199,31 @@ build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
distcleancheck_listfiles = @distcleancheck_listfiles@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
@@ -228,7 +238,7 @@ appman_PRE = \
|
||||
|
||||
appmandir = $(APP_MAN_DIR)
|
||||
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
|
||||
EXTRA_DIST = $(appman_PRE) ChangeLog autogen.sh
|
||||
EXTRA_DIST = $(appman_PRE) ChangeLog
|
||||
CLEANFILES = $(appman_DATA)
|
||||
MAINTAINERCLEANFILES = ChangeLog
|
||||
SED = sed
|
||||
@@ -654,7 +664,7 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
|
||||
.PHONY: ChangeLog
|
||||
|
||||
ChangeLog:
|
||||
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
|
||||
$(CHANGELOG_CMD)
|
||||
|
||||
dist-hook: ChangeLog
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
All questions regarding this software should be directed at the
|
||||
Xorg mailing list:
|
||||
|
||||
http://lists.freedesktop.org/mailman/listinfo/xorg
|
||||
|
||||
Please submit bug reports to the Xorg bugzilla:
|
||||
|
||||
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
|
||||
|
||||
The master development code repository can be found at:
|
||||
|
||||
git://anongit.freedesktop.org/git/xorg/app/xset
|
||||
|
||||
http://cgit.freedesktop.org/xorg/app/xset
|
||||
|
||||
For patch submission instructions, see:
|
||||
|
||||
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
|
||||
|
||||
For more information on the git code manager, see:
|
||||
|
||||
http://wiki.x.org/wiki/GitPage
|
||||
|
||||
|
||||
138
app/xset/aclocal.m4
vendored
138
app/xset/aclocal.m4
vendored
@@ -995,6 +995,7 @@ AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
|
||||
dnl
|
||||
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl
|
||||
@@ -1031,27 +1032,24 @@ dnl of the copyright holder.
|
||||
# your configure.ac with the minimum required version, such as:
|
||||
# XORG_MACROS_VERSION(1.1)
|
||||
#
|
||||
# To force at least a version with this macro defined, also add:
|
||||
# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
|
||||
# To ensure that this macro is defined, also add:
|
||||
# m4_ifndef([XORG_MACROS_VERSION],
|
||||
# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
|
||||
#
|
||||
#
|
||||
# See the "minimum version" comment for each macro you use to see what
|
||||
# version you require.
|
||||
AC_DEFUN([XORG_MACROS_VERSION],[
|
||||
[XORG_MACROS_needed_version=$1
|
||||
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
|
||||
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
|
||||
AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
|
||||
[XORG_MACROS_version=1.1.6
|
||||
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
|
||||
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
|
||||
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
|
||||
AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
|
||||
fi
|
||||
if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
|
||||
AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
|
||||
fi
|
||||
AC_MSG_RESULT([yes, $XORG_MACROS_version])
|
||||
m4_defun([XORG_MACROS_VERSION],[
|
||||
m4_define([vers_have], [1.3.0])
|
||||
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
|
||||
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
|
||||
m4_if(m4_cmp(maj_have, maj_needed), 0,,
|
||||
[m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
|
||||
m4_if(m4_version_compare(vers_have, [$1]), -1,
|
||||
[m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
|
||||
m4_undefine([vers_have])
|
||||
m4_undefine([maj_have])
|
||||
m4_undefine([maj_needed])
|
||||
]) # XORG_MACROS_VERSION
|
||||
|
||||
# XORG_PROG_RAWCPP()
|
||||
@@ -1076,6 +1074,10 @@ else
|
||||
if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
RAWCPPFLAGS=-undef
|
||||
AC_MSG_RESULT([yes])
|
||||
# under Cygwin unix is still defined even with -undef
|
||||
elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
RAWCPPFLAGS="-undef -ansi"
|
||||
AC_MSG_RESULT([yes, with -ansi])
|
||||
else
|
||||
AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
|
||||
fi
|
||||
@@ -1188,7 +1190,9 @@ AC_SUBST([ADMIN_MAN_DIR])
|
||||
# Whether or not the necessary tools and files are found can be checked
|
||||
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
|
||||
AC_DEFUN([XORG_CHECK_LINUXDOC],[
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
|
||||
if test x"$cross_compiling" = x"yes" ; then
|
||||
@@ -1244,7 +1248,9 @@ AC_SUBST(MAKE_HTML)
|
||||
# indicates whether the necessary tools and files are found and, if set,
|
||||
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
|
||||
AC_DEFUN([XORG_CHECK_DOCBOOK],[
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
BUILDTXTDOC=no
|
||||
BUILDPDFDOC=no
|
||||
@@ -1310,7 +1316,7 @@ AC_SUBST(MAKE_HTML)
|
||||
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
|
||||
AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
|
||||
AC_ARG_ENABLE(malloc0returnsnull,
|
||||
AC_HELP_STRING([--enable-malloc0returnsnull],
|
||||
AS_HELP_STRING([--enable-malloc0returnsnull],
|
||||
[malloc(0) returns NULL (default: auto)]),
|
||||
[MALLOC_ZERO_RETURNS_NULL=$enableval],
|
||||
[MALLOC_ZERO_RETURNS_NULL=auto])
|
||||
@@ -1362,7 +1368,7 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
|
||||
AC_DEFUN([XORG_WITH_LINT],[
|
||||
|
||||
# Allow checking code with lint, sparse, etc.
|
||||
AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
|
||||
AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
|
||||
[Use a lint-style source code checker (default: disabled)])],
|
||||
[use_lint=$withval], [use_lint=no])
|
||||
if test "x$use_lint" = "xyes" ; then
|
||||
@@ -1403,7 +1409,7 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
|
||||
AC_DEFUN([XORG_LINT_LIBRARY],[
|
||||
AC_REQUIRE([XORG_WITH_LINT])
|
||||
# Build lint "library" for more indepth checks of programs calling this library
|
||||
AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
|
||||
AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
|
||||
[Create lint library (default: disabled)])],
|
||||
[make_lint_lib=$enableval], [make_lint_lib=no])
|
||||
if test "x$make_lint_lib" != "xno" ; then
|
||||
@@ -1421,6 +1427,75 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
|
||||
|
||||
]) # XORG_LINT_LIBRARY
|
||||
|
||||
# XORG_CWARNFLAGS
|
||||
# ---------------
|
||||
# Minimum version: 1.2.0
|
||||
#
|
||||
# Defines CWARNFLAGS to enable C compiler warnings.
|
||||
#
|
||||
AC_DEFUN([XORG_CWARNFLAGS], [
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
if test "x$GCC" = xyes ; then
|
||||
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
|
||||
-Wbad-function-cast"
|
||||
case `$CC -dumpversion` in
|
||||
3.4.* | 4.*)
|
||||
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||
if test "x$SUNCC" = "xyes"; then
|
||||
CWARNFLAGS="-v"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CWARNFLAGS)
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
]) # XORG_CWARNFLAGS
|
||||
|
||||
# XORG_STRICT_OPTION
|
||||
# -----------------------
|
||||
# Minimum version: 1.3.0
|
||||
#
|
||||
# Add configure option to enable strict compilation
|
||||
AC_DEFUN([XORG_STRICT_OPTION], [
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_CC_C99])
|
||||
AC_REQUIRE([XORG_CWARNFLAGS])
|
||||
|
||||
AC_ARG_ENABLE(strict-compilation,
|
||||
AS_HELP_STRING([--enable-strict-compilation],
|
||||
[Enable all warnings from compiler and make them errors (default: disabled)]),
|
||||
[STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
|
||||
if test "x$STRICT_COMPILE" = "xyes"; then
|
||||
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||
AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
|
||||
if test "x$GCC" = xyes ; then
|
||||
STRICT_CFLAGS="-pedantic -Werror"
|
||||
elif test "x$SUNCC" = "xyes"; then
|
||||
STRICT_CFLAGS="-errwarn"
|
||||
elif test "x$INTELCC" = "xyes"; then
|
||||
STRICT_CFLAGS="-Werror"
|
||||
fi
|
||||
fi
|
||||
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
|
||||
AC_SUBST([CWARNFLAGS])
|
||||
]) # XORG_STRICT_OPTION
|
||||
|
||||
# XORG_DEFAULT_OPTIONS
|
||||
# --------------------
|
||||
# Minimum version: 1.3.0
|
||||
#
|
||||
# Defines default options for X.Org modules.
|
||||
#
|
||||
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
|
||||
XORG_CWARNFLAGS
|
||||
XORG_STRICT_OPTION
|
||||
XORG_RELEASE_VERSION
|
||||
XORG_CHANGELOG
|
||||
XORG_MANPAGE_SECTIONS
|
||||
]) # XORG_DEFAULT_OPTIONS
|
||||
dnl Copyright 2005 Red Hat, Inc
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
@@ -1455,7 +1530,7 @@ dnl
|
||||
|
||||
AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
AC_ARG_WITH(release-version,
|
||||
AC_HELP_STRING([--with-release-version=STRING],
|
||||
AS_HELP_STRING([--with-release-version=STRING],
|
||||
[Use release version string in package name]),
|
||||
[RELEASE_VERSION="$withval"],
|
||||
[RELEASE_VERSION=""])
|
||||
@@ -1483,3 +1558,20 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
[Patch version of this package])
|
||||
])
|
||||
|
||||
# XORG_CHANGELOG()
|
||||
# ----------------
|
||||
# Minimum version: 1.2.0
|
||||
#
|
||||
# Defines the variable CHANGELOG_CMD as the command to generate
|
||||
# ChangeLog from git.
|
||||
#
|
||||
# Arrange that distcleancheck ignores ChangeLog left over by distclean.
|
||||
#
|
||||
AC_DEFUN([XORG_CHANGELOG], [
|
||||
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
|
||||
mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
|
||||
echo 'git directory not found: installing possibly empty changelog.' >&2)"
|
||||
AC_SUBST([CHANGELOG_CMD])
|
||||
AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
|
||||
]) # XORG_CHANGELOG
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
|
||||
autoreconf -v --install || exit 1
|
||||
cd $ORIGDIR || exit $?
|
||||
|
||||
$srcdir/configure --enable-maintainer-mode "$@"
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* 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 <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `usleep' function. */
|
||||
#undef HAVE_USLEEP
|
||||
|
||||
@@ -54,5 +81,8 @@
|
||||
/* Patch version of this package */
|
||||
#undef PACKAGE_VERSION_PATCHLEVEL
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
7957
app/xset/configure
vendored
7957
app/xset/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -21,15 +21,20 @@ dnl
|
||||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
AC_PREREQ([2.57])
|
||||
AC_INIT(xset,[1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xset)
|
||||
AC_INIT(xset,[1.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xset)
|
||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# Require xorg-macros: XORG_DEFAULT_OPTIONS
|
||||
m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
|
||||
XORG_MACROS_VERSION(1.3)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
XORG_DEFAULT_OPTIONS
|
||||
|
||||
# Checks for system functions
|
||||
AC_CHECK_FUNCS([usleep])
|
||||
|
||||
@@ -71,13 +76,10 @@ PKG_CHECK_MODULES(SET_XPRINT, xp,
|
||||
AC_CHECK_HEADERS([X11/extensions/Print.h],,,[#include <X11/Xlib.h>])
|
||||
CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
|
||||
|
||||
XSET_CFLAGS="$XSET_CFLAGS $SET_XEXT_CFLAGS $SET_XKB_CFLAGS $SET_XF86MISC_CFLAGS $SET_FONTCACHE_CFLAGS $SET_XPRINT_CFLAGS"
|
||||
XSET_CFLAGS="$CWARNFLAGS $XSET_CFLAGS $SET_XEXT_CFLAGS $SET_XKB_CFLAGS $SET_XF86MISC_CFLAGS $SET_FONTCACHE_CFLAGS $SET_XPRINT_CFLAGS"
|
||||
XSET_LIBS="$XSET_LIBS $SET_XEXT_LIBS $SET_XKB_LIBS $SET_XF86MISC_LIBS $SET_FONTCACHE_LIBS $SET_XPRINT_LIBS"
|
||||
|
||||
AC_SUBST(XSET_CFLAGS)
|
||||
AC_SUBST(XSET_LIBS)
|
||||
|
||||
XORG_MANPAGE_SECTIONS
|
||||
XORG_RELEASE_VERSION
|
||||
|
||||
AC_OUTPUT([Makefile])
|
||||
|
||||
176
app/xset/xset.c
176
app/xset/xset.c
@@ -141,9 +141,9 @@ static void query_cache_status(Display *dpy);
|
||||
if (i >= argc) \
|
||||
break; \
|
||||
|
||||
char *progName;
|
||||
static char *progName;
|
||||
|
||||
int error_status = 0;
|
||||
static int error_status = 0;
|
||||
|
||||
static int is_number(char *arg, int maximum);
|
||||
static void set_click(Display *dpy, int percent);
|
||||
@@ -153,6 +153,7 @@ static void set_bell_dur(Display *dpy, int duration);
|
||||
static void set_font_path(Display *dpy, char *path, int special,
|
||||
int before, int after);
|
||||
static void set_led(Display *dpy, int led, int led_mode);
|
||||
static void xkbset_led(Display *dpy, const char *led, int led_mode);
|
||||
static void set_mouse(Display *dpy, int acc_num, int acc_denom, int threshold);
|
||||
static void set_saver(Display *dpy, int mask, int value);
|
||||
static void set_repeat(Display *dpy, int key, int auto_repeat_mode);
|
||||
@@ -195,18 +196,13 @@ main(int argc, char *argv[])
|
||||
Display *dpy;
|
||||
Bool hasargs = False;
|
||||
|
||||
#ifdef XF86MISC
|
||||
int miscpresent = 1;
|
||||
int major, minor;
|
||||
#else
|
||||
int miscpresent = 0;
|
||||
#endif
|
||||
int xkbpresent = 0;
|
||||
|
||||
#ifdef XKB
|
||||
int xkbpresent = 1;
|
||||
int xkbmajor = XkbMajorVersion, xkbminor = XkbMinorVersion;
|
||||
int xkbopcode, xkbevent, xkberror;
|
||||
#else
|
||||
int xkbpresent = 0;
|
||||
#endif
|
||||
#ifdef FONTCACHE
|
||||
long himark, lowmark, balance;
|
||||
@@ -444,6 +440,15 @@ main(int argc, char *argv[])
|
||||
break;
|
||||
}
|
||||
arg = nextarg(i, argv);
|
||||
if (strcmp(arg, "named") == 0) {
|
||||
if (++i >= argc) {
|
||||
usage("missing argument to led named", NULL);
|
||||
} else {
|
||||
arg = nextarg(i, argv);
|
||||
xkbset_led(dpy, arg, values.led_mode);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (is_number(arg, 32) && atoi(arg) > 0) {
|
||||
values.led = atoi(arg);
|
||||
i++;
|
||||
@@ -458,6 +463,15 @@ main(int argc, char *argv[])
|
||||
break;
|
||||
}
|
||||
arg = nextarg(i, argv);
|
||||
if (strcmp(arg, "named") == 0) {
|
||||
if (++i >= argc) {
|
||||
usage("missing argument to -led named", NULL);
|
||||
} else {
|
||||
arg = nextarg(i, argv);
|
||||
xkbset_led(dpy, arg, values.led_mode);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (strcmp(arg, "on") == 0) {
|
||||
i++;
|
||||
} else if (strcmp(arg, "off") == 0) { /* ...except in this case. */
|
||||
@@ -731,22 +745,28 @@ main(int argc, char *argv[])
|
||||
|
||||
#ifdef XF86MISC
|
||||
int rate_set = 0;
|
||||
|
||||
if (XF86MiscQueryVersion(dpy, &major, &minor)) {
|
||||
delay = KBDDELAY_DEFAULT, rate = KBDRATE_DEFAULT;
|
||||
} else {
|
||||
miscpresent = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef XKB
|
||||
if (XkbQueryExtension(dpy, &xkbopcode, &xkbevent,
|
||||
&xkberror, &xkbmajor, &xkbminor)) {
|
||||
delay = XKBDDELAY_DEFAULT, rate = XKBDRATE_DEFAULT;
|
||||
} else {
|
||||
xkbpresent = 0;
|
||||
delay = XKBDDELAY_DEFAULT;
|
||||
rate = XKBDRATE_DEFAULT;
|
||||
xkbpresent = 1;
|
||||
}
|
||||
#endif
|
||||
if (!miscpresent && !xkbpresent)
|
||||
#ifdef XF86MISC
|
||||
if (!xkbpresent) {
|
||||
int dummy;
|
||||
|
||||
if (XF86MiscQueryExtension(dpy, &dummy, &dummy)) {
|
||||
delay = KBDDELAY_DEFAULT;
|
||||
rate = KBDRATE_DEFAULT;
|
||||
miscpresent = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (!xkbpresent && !miscpresent)
|
||||
fprintf(stderr,
|
||||
"server does not have extension for \"r rate\" option\n");
|
||||
i++;
|
||||
@@ -1059,6 +1079,36 @@ set_led(Display *dpy, int led, int led_mode)
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
xkbset_led(Display *dpy, const char *led, int led_mode)
|
||||
{
|
||||
#ifndef XKB
|
||||
error(" xset was not built with XKB Extension support\n");
|
||||
#else
|
||||
int xkbmajor = XkbMajorVersion, xkbminor = XkbMinorVersion;
|
||||
int xkbopcode, xkbevent, xkberror;
|
||||
Atom ledatom;
|
||||
|
||||
if (XkbQueryExtension(dpy, &xkbopcode, &xkbevent, &xkberror,
|
||||
&xkbmajor, &xkbminor)) {
|
||||
ledatom = XInternAtom(dpy, led, True);
|
||||
if ((ledatom != None) &&
|
||||
XkbGetNamedIndicator(dpy, ledatom, NULL, NULL, NULL, NULL)) {
|
||||
if (XkbSetNamedIndicator(dpy, ledatom, True,
|
||||
led_mode, False, NULL) == False) {
|
||||
printf("Failed to set led named %s %s\n",
|
||||
led, led_mode ? "on" : "off");
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr,"%s: Invalid led name: %s\n", progName, led);
|
||||
}
|
||||
} else {
|
||||
printf(" Server does not have the XKB Extension\n");
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
set_mouse(Display *dpy, int acc_num, int acc_denom, int threshold)
|
||||
{
|
||||
@@ -1313,10 +1363,86 @@ query(Display *dpy)
|
||||
#ifdef XKB
|
||||
if (XkbQueryExtension(dpy, &xkbopcode, &xkbevent, &xkberror, &xkbmajor,
|
||||
&xkbminor)
|
||||
&& (xkb = XkbAllocKeyboard()) != NULL
|
||||
&& XkbGetControls(dpy, XkbRepeatKeysMask, xkb) == Success)
|
||||
printf(" auto repeat delay: %d repeat rate: %d\n",
|
||||
xkb->ctrls->repeat_delay, 1000 / xkb->ctrls->repeat_interval);
|
||||
&& (xkb = XkbAllocKeyboard()) != NULL) {
|
||||
if (XkbGetNames(dpy, XkbIndicatorNamesMask, xkb) == Success) {
|
||||
Atom iatoms[XkbNumIndicators];
|
||||
char *iatomnames[XkbNumIndicators];
|
||||
Bool istates[XkbNumIndicators];
|
||||
int inds[XkbNumIndicators];
|
||||
int activecount = 0;
|
||||
int maxnamelen = 0;
|
||||
int columnwidth;
|
||||
int linewidth;
|
||||
|
||||
printf(" XKB indicators:\n");
|
||||
|
||||
for (i = 0, j = 0; i < XkbNumIndicators; i++) {
|
||||
if (xkb->names->indicators[i] != None) {
|
||||
iatoms[j++] = xkb->names->indicators[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (XGetAtomNames(dpy, iatoms, j, iatomnames)) {
|
||||
for (i = 0; i < j; i++) {
|
||||
Bool state;
|
||||
int ind;
|
||||
|
||||
if (XkbGetNamedIndicator(dpy, iatoms[i], &inds[i],
|
||||
&istates[i], NULL, NULL)) {
|
||||
int namelen = strlen(iatomnames[i]);
|
||||
if (namelen > maxnamelen) {
|
||||
maxnamelen = namelen;
|
||||
}
|
||||
activecount++;
|
||||
} else {
|
||||
inds[i] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (activecount == 0) {
|
||||
printf(" None\n");
|
||||
} else {
|
||||
|
||||
#define XKB_IND_FORMAT_CHARS 13 /* size of other chars in ' DD: X: off' */
|
||||
#define MAX_LINE_WIDTH 76
|
||||
|
||||
columnwidth = maxnamelen + XKB_IND_FORMAT_CHARS;
|
||||
if (columnwidth > MAX_LINE_WIDTH) {
|
||||
columnwidth = MAX_LINE_WIDTH;
|
||||
}
|
||||
|
||||
for (i = 0, linewidth = 0; i < activecount ; i++) {
|
||||
if (inds[i] != -1) {
|
||||
int spaces = columnwidth - XKB_IND_FORMAT_CHARS
|
||||
- strlen(iatomnames[i]);
|
||||
|
||||
if (spaces < 0)
|
||||
spaces = 0;
|
||||
|
||||
linewidth += printf(" %02d: %s: %*s",
|
||||
inds[i], iatomnames[i],
|
||||
spaces + 3,
|
||||
on_or_off(istates[i],
|
||||
True, "on ",
|
||||
False, "off", buf));
|
||||
}
|
||||
if (linewidth > (MAX_LINE_WIDTH - columnwidth)) {
|
||||
printf("\n");
|
||||
linewidth = 0;
|
||||
}
|
||||
}
|
||||
if (linewidth > 0) {
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (XkbGetControls(dpy, XkbRepeatKeysMask, xkb) == Success) {
|
||||
printf(" auto repeat delay: %d repeat rate: %d\n",
|
||||
xkb->ctrls->repeat_delay,
|
||||
1000 / xkb->ctrls->repeat_interval);
|
||||
}
|
||||
}
|
||||
#ifdef XF86MISC
|
||||
else
|
||||
#endif
|
||||
@@ -1577,6 +1703,10 @@ usage(char *fmt, ...)
|
||||
fprintf(stderr, " To set LED states off or on:\n");
|
||||
fprintf(stderr, "\t-led [1-32] led off\n");
|
||||
fprintf(stderr, "\t led [1-32] led on\n");
|
||||
#ifdef XKB
|
||||
fprintf(stderr, "\t-led named 'name' led off\n");
|
||||
fprintf(stderr, "\t led named 'name' led on\n");
|
||||
#endif
|
||||
fprintf(stderr, " To set mouse acceleration and threshold:\n");
|
||||
fprintf(stderr, "\t m [acc_mult[/acc_div] [thr]] m default\n");
|
||||
fprintf(stderr, " To set pixel colors:\n");
|
||||
|
||||
@@ -51,8 +51,8 @@ xset - user preference utility for X
|
||||
.br
|
||||
[fp default] [fp rehash]
|
||||
.br
|
||||
[-led [\fIinteger\fP]]
|
||||
[+led [\fIinteger\fP]]
|
||||
[-led [\fIinteger\fP|named \fIindicator\fP]]
|
||||
[led [\fIinteger\fP|named \fIindicator\fP]]
|
||||
.br
|
||||
[led {on|off}]
|
||||
.br
|
||||
@@ -176,10 +176,14 @@ If no parameter or the 'on' flag is given, all LEDs are turned on.
|
||||
If a preceding dash or the flag 'off' is given, all LEDs are turned off.
|
||||
If a value between 1 and 32 is given, that LED will be turned on or off
|
||||
depending on the existence of a preceding dash.
|
||||
A common LED which can be controlled is the ``Caps Lock'' LED. ``xset
|
||||
led 3'' would turn led #3 on. ``xset -led 3'' would turn it off.
|
||||
``xset led 3'' would turn led #3 on. ``xset -led 3'' would turn it off.
|
||||
The particular LED values may refer to different LEDs on different
|
||||
hardware.
|
||||
If the X server supports the XKEYBOARD (XKB) extension, leds may be
|
||||
referenced by the XKB indicator name by specifying the `named' keyword
|
||||
and the indicator name. For example, to turn on the Scroll Lock LED:
|
||||
.IP
|
||||
xset led named "Scroll Lock"
|
||||
.PP
|
||||
.TP 8
|
||||
.B mouse
|
||||
@@ -201,9 +205,9 @@ If no parameters or the flag 'default' is used, the system defaults will
|
||||
be set.
|
||||
|
||||
If the `threshold' parameter is provided and 0, the `acceleration'
|
||||
parameter will be used in the exponent of a more natural and continous
|
||||
parameter will be used in the exponent of a more natural and continuous
|
||||
formula, giving precise control for slow motion but big reach for fast
|
||||
motion, and a progresive transition for motions in between.
|
||||
motion, and a progressive transition for motions in between.
|
||||
Recommended `acceleration' value in this case is 3/2 to 2, but not
|
||||
limited to that range.
|
||||
.PP
|
||||
|
||||
Reference in New Issue
Block a user