Update to libXi 1.7.2.
Tested by ajacoutot@ against gnome.
This commit is contained in:
parent
fbb525fc02
commit
3be5e5d5ea
@ -1,3 +1,87 @@
|
||||
commit b6553cdb36c1bd7071d3bf0493216c5483325716
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Wed Jul 3 10:28:10 2013 +1000
|
||||
|
||||
libXi 1.7.2
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit d804af99e2dfaf20b99822066a37d586f12c8a5f
|
||||
Author: Thomas Klausner <wiz@NetBSD.org>
|
||||
Date: Thu Jun 27 17:16:38 2013 +0200
|
||||
|
||||
Remove check that can never be true.
|
||||
|
||||
clang warns:
|
||||
warning: comparison of constant 268435455 with expression of type
|
||||
'CARD16' (aka 'unsigned short') is always false
|
||||
|
||||
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
|
||||
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 957a9d64afd76f878ce6c5570f369e2a7fc1e772
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Thu Jun 27 08:47:16 2013 +1000
|
||||
|
||||
libXi 1.7.1.901
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 62033a9c83bcdc75b9f1452ce24729eefa8f4dc0
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Thu Jun 27 06:25:02 2013 +1000
|
||||
|
||||
Include limits.h to prevent build error: missing INT_MAX
|
||||
|
||||
Introduced in 4c8e9bcab459ea5f870d3e56eff15f931807f9b7.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 0f3f5a36d5fc6dc53f69f48a0c83aef6a1fcf381
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue May 28 15:52:34 2013 +1000
|
||||
|
||||
If the XGetDeviceDontPropagateList reply has an invalid length, return 0
|
||||
|
||||
If we skip over the reply data, return 0 as number of event classes.
|
||||
|
||||
Follow-up to 6dd6dc51a2935c72774be81e5cc2ba2c30e9feff.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 35ae16dc2f16b24a22625b2d9f76a2128b673a6c
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue May 28 15:52:33 2013 +1000
|
||||
|
||||
Change size += to size = in XGetDeviceControl
|
||||
|
||||
size += blah is technically correct but it implies that we're looping or
|
||||
otherwise incrementing the size. Which we don't, it's only ever set once.
|
||||
|
||||
Change this to avoid reviewer confusion.
|
||||
|
||||
Reported-by: Dave "color-me-confused" Airlie <airlied@redhat.com>
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 4c8e9bcab459ea5f870d3e56eff15f931807f9b7
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue May 28 15:52:32 2013 +1000
|
||||
|
||||
Fix potential corruption in mask_len handling
|
||||
|
||||
First: check for allocation failure on the mask.
|
||||
XI2 requires that the mask is zeroed, so we can't just Data() the mask
|
||||
provided by the client (it will pad) - we need a tmp buffer. Make sure that
|
||||
doesn't fail.
|
||||
|
||||
Second:
|
||||
req->mask_len is a uint16_t, so check against malicious mask_lens that would
|
||||
cause us to corrupt memory on copy, as the code always allocates
|
||||
req->mask_len * 4, but copies mask->mask_len bytes.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
|
||||
commit 661c45ca17c434dbd342a46fd3fb813852ae0ca9
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue May 21 12:23:05 2013 +1000
|
||||
|
@ -1,6 +1,6 @@
|
||||
# $OpenBSD: Makefile.bsd-wrapper,v 1.8 2013/08/13 07:07:16 guenther Exp $
|
||||
# $OpenBSD: Makefile.bsd-wrapper,v 1.9 2014/05/09 19:55:33 matthieu Exp $
|
||||
|
||||
SHARED_LIBS= Xi 12.0
|
||||
SHARED_LIBS= Xi 12.1
|
||||
|
||||
CONFIGURE_ARGS+= --without-xmlto --without-asciidoc --without-fop \
|
||||
--disable-specs
|
||||
|
@ -53,7 +53,7 @@ host_triplet = @host@
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/xi.pc.in \
|
||||
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
|
||||
$(top_srcdir)/configure COPYING ChangeLog INSTALL NEWS \
|
||||
config.guess config.sub depcomp install-sh ltmain.sh missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
@ -226,7 +226,6 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
@ -249,6 +248,8 @@ PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
@ -257,6 +258,8 @@ STRICT_CFLAGS = @STRICT_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
|
||||
VERSION = @VERSION@
|
||||
XFIXES_CFLAGS = @XFIXES_CFLAGS@
|
||||
XFIXES_LIBS = @XFIXES_LIBS@
|
||||
XI_CFLAGS = @XI_CFLAGS@
|
||||
XI_LIBS = @XI_LIBS@
|
||||
XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@
|
||||
@ -327,7 +330,7 @@ all: all-recursive
|
||||
.SUFFIXES:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
@ -354,9 +357,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
xi.pc: $(top_builddir)/config.status $(srcdir)/xi.pc.in
|
||||
|
207
lib/libXi/aclocal.m4
vendored
207
lib/libXi/aclocal.m4
vendored
@ -8607,6 +8607,7 @@ m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
||||
|
||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
# serial 1 (pkg-config-0.24)
|
||||
#
|
||||
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
#
|
||||
@ -8633,8 +8634,12 @@ m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
||||
# ----------------------------------
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
|
||||
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
||||
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
||||
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
||||
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
||||
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
@ -8647,7 +8652,6 @@ if test -n "$PKG_CONFIG"; then
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
|
||||
fi[]dnl
|
||||
])# PKG_PROG_PKG_CONFIG
|
||||
|
||||
@ -8656,34 +8660,32 @@ fi[]dnl
|
||||
# Check to see whether a particular set of modules exists. Similar
|
||||
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
#
|
||||
#
|
||||
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
|
||||
# this or PKG_CHECK_MODULES is called, or make sure to call
|
||||
# PKG_CHECK_EXISTS manually
|
||||
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
# only at the first occurence in configure.ac, so if the first place
|
||||
# it's called might be skipped (such as if it is within an "if", you
|
||||
# have to call PKG_CHECK_EXISTS manually
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||
m4_ifval([$2], [$2], [:])
|
||||
m4_default([$2], [:])
|
||||
m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
|
||||
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
# ---------------------------------------------
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$PKG_CONFIG"; then
|
||||
if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
else
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
|
||||
[pkg_failed=yes])
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
[if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes ],
|
||||
[pkg_failed=yes])
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])# _PKG_CONFIG
|
||||
|
||||
@ -8725,16 +8727,17 @@ and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
AC_MSG_RESULT([no])
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
ifelse([$4], , [AC_MSG_ERROR(dnl
|
||||
m4_default([$4], [AC_MSG_ERROR(
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
@ -8742,28 +8745,67 @@ $$1_PKG_ERRORS
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT
|
||||
])],
|
||||
[AC_MSG_RESULT([no])
|
||||
$4])
|
||||
_PKG_TEXT])[]dnl
|
||||
])
|
||||
elif test $pkg_failed = untried; then
|
||||
ifelse([$4], , [AC_MSG_FAILURE(dnl
|
||||
AC_MSG_RESULT([no])
|
||||
m4_default([$4], [AC_MSG_FAILURE(
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
|
||||
[$4])
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
||||
])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
ifelse([$3], , :, [$3])
|
||||
$3
|
||||
fi[]dnl
|
||||
])# PKG_CHECK_MODULES
|
||||
|
||||
|
||||
# PKG_INSTALLDIR(DIRECTORY)
|
||||
# -------------------------
|
||||
# Substitutes the variable pkgconfigdir as the location where a module
|
||||
# should install pkg-config .pc files. By default the directory is
|
||||
# $libdir/pkgconfig, but the default can be changed by passing
|
||||
# DIRECTORY. The user can override through the --with-pkgconfigdir
|
||||
# parameter.
|
||||
AC_DEFUN([PKG_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
|
||||
[with_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
]) dnl PKG_INSTALLDIR
|
||||
|
||||
|
||||
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
|
||||
# -------------------------
|
||||
# Substitutes the variable noarch_pkgconfigdir as the location where a
|
||||
# module should install arch-independent pkg-config .pc files. By
|
||||
# default the directory is $datadir/pkgconfig, but the default can be
|
||||
# changed by passing DIRECTORY. The user can override through the
|
||||
# --with-noarch-pkgconfigdir parameter.
|
||||
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([noarch-pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
|
||||
[with_noarch_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
]) dnl PKG_NOARCH_INSTALLDIR
|
||||
|
||||
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
@ -9344,44 +9386,6 @@ fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||
# From Jim Meyering
|
||||
|
||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_MAINTAINER_MODE([DEFAULT-MODE])
|
||||
# ----------------------------------
|
||||
# Control maintainer-specific portions of Makefiles.
|
||||
# Default is to disable them, unless 'enable' is passed literally.
|
||||
# For symmetry, 'disable' may be passed as well. Anyway, the user
|
||||
# can override the default with the --enable/--disable switch.
|
||||
AC_DEFUN([AM_MAINTAINER_MODE],
|
||||
[m4_case(m4_default([$1], [disable]),
|
||||
[enable], [m4_define([am_maintainer_other], [disable])],
|
||||
[disable], [m4_define([am_maintainer_other], [enable])],
|
||||
[m4_define([am_maintainer_other], [enable])
|
||||
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
|
||||
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
|
||||
AC_ARG_ENABLE([maintainer-mode],
|
||||
[AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
|
||||
am_maintainer_other[ make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer])],
|
||||
[USE_MAINTAINER_MODE=$enableval],
|
||||
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
|
||||
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
||||
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
|
||||
MAINT=$MAINTAINER_MODE_TRUE
|
||||
AC_SUBST([MAINT])dnl
|
||||
]
|
||||
)
|
||||
|
||||
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||
@ -9824,7 +9828,7 @@ dnl DEALINGS IN THE SOFTWARE.
|
||||
# See the "minimum version" comment for each macro you use to see what
|
||||
# version you require.
|
||||
m4_defun([XORG_MACROS_VERSION],[
|
||||
m4_define([vers_have], [1.16.2])
|
||||
m4_define([vers_have], [1.19.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,,
|
||||
@ -9874,6 +9878,7 @@ if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
||||
TRADITIONALCPPFLAGS="-traditional"
|
||||
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
@ -9882,6 +9887,7 @@ else
|
||||
fi
|
||||
rm -f conftest.$ac_ext
|
||||
AC_SUBST(RAWCPPFLAGS)
|
||||
AC_SUBST(TRADITIONALCPPFLAGS)
|
||||
]) # XORG_PROG_RAWCPP
|
||||
|
||||
# XORG_MANPAGE_SECTIONS()
|
||||
@ -10406,9 +10412,10 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
|
||||
]) # XORG_WITH_ASCIIDOC
|
||||
|
||||
# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
|
||||
# --------------------------------
|
||||
# -------------------------------------------
|
||||
# Minimum version: 1.5.0
|
||||
# Minimum version for optional DEFAULT argument: 1.11.0
|
||||
# Minimum version for optional DOT checking: 1.18.0
|
||||
#
|
||||
# Documentation tools are not always available on all platforms and sometimes
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
@ -10428,6 +10435,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_DOXYGEN],[
|
||||
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
|
||||
AC_ARG_VAR([DOT], [Path to the dot graphics utility])
|
||||
m4_define([_defopt], m4_default([$2], [auto]))
|
||||
AC_ARG_WITH(doxygen,
|
||||
AS_HELP_STRING([--with-doxygen],
|
||||
@ -10471,6 +10479,20 @@ m4_ifval([$1],
|
||||
AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
|
||||
fi])
|
||||
fi])
|
||||
|
||||
dnl Check for DOT if we have doxygen. The caller decides if it is mandatory
|
||||
dnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
|
||||
dnl HAVE_DOT = @HAVE_DOT@
|
||||
HAVE_DOT=no
|
||||
if test "x$have_doxygen" = "xyes"; then
|
||||
AC_PATH_PROG([DOT], [dot])
|
||||
if test "x$DOT" != "x"; then
|
||||
HAVE_DOT=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST([HAVE_DOT])
|
||||
AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
|
||||
]) # XORG_WITH_DOXYGEN
|
||||
|
||||
@ -10653,6 +10675,29 @@ fi])
|
||||
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
|
||||
]) # XORG_WITH_FOP
|
||||
|
||||
# XORG_WITH_M4([MIN-VERSION])
|
||||
# ---------------------------
|
||||
# Minimum version: 1.19.0
|
||||
#
|
||||
# This macro attempts to locate an m4 macro processor which supports
|
||||
# -I option and is only useful for modules relying on M4 in order to
|
||||
# expand macros in source code files.
|
||||
#
|
||||
# Interface to module:
|
||||
# M4: returns the path of the m4 program found
|
||||
# returns the path set by the user in the environment
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_M4], [
|
||||
AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
|
||||
[AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
|
||||
[[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
|
||||
ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
|
||||
[AC_MSG_ERROR([could not find m4 that supports -I option])],
|
||||
[$PATH:/usr/gnu/bin])])
|
||||
|
||||
AC_SUBST([M4], [$ac_cv_path_M4])
|
||||
]) # XORG_WITH_M4
|
||||
|
||||
# XORG_WITH_PS2PDF([DEFAULT])
|
||||
# ----------------
|
||||
# Minimum version: 1.6.0
|
||||
@ -11107,7 +11152,8 @@ AC_ARG_ENABLE(malloc0returnsnull,
|
||||
|
||||
AC_MSG_CHECKING([whether malloc(0) returns NULL])
|
||||
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
|
||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([
|
||||
AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
|
||||
[AC_RUN_IFELSE([AC_LANG_PROGRAM([
|
||||
#include <stdlib.h>
|
||||
],[
|
||||
char *m0, *r0, *c0, *p;
|
||||
@ -11117,9 +11163,9 @@ if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
|
||||
c0 = calloc(0,10);
|
||||
exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
|
||||
])],
|
||||
[MALLOC_ZERO_RETURNS_NULL=yes],
|
||||
[MALLOC_ZERO_RETURNS_NULL=no],
|
||||
[MALLOC_ZERO_RETURNS_NULL=yes])
|
||||
[xorg_cv_malloc0_returns_null=yes],
|
||||
[xorg_cv_malloc0_returns_null=no])])
|
||||
MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
|
||||
fi
|
||||
AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
|
||||
|
||||
@ -11330,18 +11376,18 @@ fi
|
||||
found="no"
|
||||
m4_foreach([flag], m4_cdr($@), [
|
||||
if test $found = "no" ; then
|
||||
if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
|
||||
if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
|
||||
fi
|
||||
|
||||
if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
|
||||
if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
|
||||
fi
|
||||
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
|
||||
|
||||
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
|
||||
AC_MSG_CHECKING([if ]COMPILER[ supports]flag[])
|
||||
AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
|
||||
cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
|
||||
AC_CACHE_VAL($cacheid,
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
|
||||
@ -11408,7 +11454,7 @@ AC_LANG_CASE(
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
|
||||
]
|
||||
)
|
||||
@ -11417,16 +11463,17 @@ AC_LANG_CASE(
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
|
||||
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]], [-Wlogical-op])
|
||||
|
||||
# These are currently disabled because they are noisy. They will be enabled
|
||||
# in the future once the codebase is sufficiently modernized to silence
|
||||
# them. For now, I don't want them to drown out the other warnings.
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
|
||||
|
||||
# Turn some warnings into errors, so we don't accidently get successful builds
|
||||
# when there are problems that should be fixed.
|
||||
|
925
lib/libXi/configure
vendored
925
lib/libXi/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,13 @@
|
||||
|
||||
# Initialize Autoconf
|
||||
AC_PREREQ([2.60])
|
||||
AC_INIT([libXi], [1.6.2.901],
|
||||
AC_INIT([libXi], [1.7.2],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AC_CONFIG_HEADERS([src/config.h])
|
||||
|
||||
# Initialize Automake
|
||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# Initialize libtool
|
||||
AC_PROG_LIBTOOL
|
||||
@ -28,7 +27,9 @@ XORG_WITH_ASCIIDOC(8.4.5)
|
||||
XORG_CHECK_MALLOC_ZERO
|
||||
|
||||
# Obtain compiler/linker options for dependencies
|
||||
PKG_CHECK_MODULES(XI, [xproto >= 7.0.13] [x11 >= 1.4.99.1] [xextproto >= 7.0.3] [xext >= 1.0.99.1] [inputproto >= 2.1.99.6])
|
||||
PKG_CHECK_MODULES(XI, [xproto >= 7.0.13] [x11 >= 1.4.99.1] [xextproto >= 7.0.3] [xext >= 1.0.99.1] [inputproto >= 2.2.99.1])
|
||||
# CFLAGS only for PointerBarrier typedef
|
||||
PKG_CHECK_MODULES(XFIXES, [xfixes >= 5])
|
||||
|
||||
# Check for _XEatDataWords function that may be patched into older Xlib releases
|
||||
SAVE_LIBS="$LIBS"
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/XI2.h>
|
||||
#include <X11/extensions/Xge.h>
|
||||
#include <X11/extensions/Xfixes.h> /* PointerBarrier */
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
@ -169,6 +170,15 @@ typedef struct
|
||||
int status;
|
||||
} XIGrabModifiers;
|
||||
|
||||
typedef unsigned int BarrierEventID;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int deviceid;
|
||||
PointerBarrier barrier;
|
||||
BarrierEventID eventid;
|
||||
} XIBarrierReleasePointerInfo;
|
||||
|
||||
/**
|
||||
* Generic XI2 event. All XI2 events have the same header.
|
||||
*/
|
||||
@ -328,6 +338,28 @@ typedef struct {
|
||||
int flags;
|
||||
} XITouchOwnershipEvent;
|
||||
|
||||
typedef struct {
|
||||
int type; /* GenericEvent */
|
||||
unsigned long serial; /* # of last request processed by server */
|
||||
Bool send_event; /* true if this came from a SendEvent request */
|
||||
Display *display; /* Display the event was read from */
|
||||
int extension; /* XI extension offset */
|
||||
int evtype;
|
||||
Time time;
|
||||
int deviceid;
|
||||
int sourceid;
|
||||
Window event;
|
||||
Window root;
|
||||
double root_x;
|
||||
double root_y;
|
||||
double dx;
|
||||
double dy;
|
||||
int dtime;
|
||||
int flags;
|
||||
PointerBarrier barrier;
|
||||
BarrierEventID eventid;
|
||||
} XIBarrierEvent;
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern Bool XIQueryPointer(
|
||||
@ -603,6 +635,21 @@ XIGetProperty(
|
||||
unsigned char **data
|
||||
);
|
||||
|
||||
extern void
|
||||
XIBarrierReleasePointers(
|
||||
Display* display,
|
||||
XIBarrierReleasePointerInfo *barriers,
|
||||
int num_barriers
|
||||
);
|
||||
|
||||
extern void
|
||||
XIBarrierReleasePointer(
|
||||
Display* display,
|
||||
int deviceid,
|
||||
PointerBarrier barrier,
|
||||
BarrierEventID eventid
|
||||
);
|
||||
|
||||
extern void XIFreeDeviceInfo(XIDeviceInfo *info);
|
||||
|
||||
_XFUNCPROTOEND
|
||||
|
@ -25,6 +25,7 @@ libmandir = $(LIB_MAN_DIR)
|
||||
|
||||
# Source files for X Input v2 man pages
|
||||
XI2_txt = \
|
||||
XIBarrierReleasePointer.txt \
|
||||
XIChangeHierarchy.txt \
|
||||
XIDefineCursor.txt \
|
||||
XIGrabButton.txt \
|
||||
@ -76,6 +77,7 @@ libman_xml = $(libman_txt:.txt=.xml)
|
||||
# They are created by the xmlto command when generating man pages from DocBook
|
||||
# The shadow man page contains a gtroff .so request to include the main man page
|
||||
XI2_shadows = \
|
||||
XIBarrierReleasePointers.man \
|
||||
XIUndefineCursor.man \
|
||||
XIUngrabButton.man \
|
||||
XIGrabKeycode.man \
|
||||
@ -153,6 +155,7 @@ XIDeleteProperty.man: XIChangeProperty.man
|
||||
XIUngrabEnter.man XIGrabFocusIn.man XIUngrabFocusIn.man: XIGrabEnter.man
|
||||
XIGetSelectedEvents.man: XISelectEvents.man
|
||||
XIFreeDeviceInfo.man: XIQueryDevice.man
|
||||
XIBarrierReleasePointers.man: XIBarrierReleasePointer.man
|
||||
endif
|
||||
|
||||
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
|
||||
|
@ -190,7 +190,6 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
@ -223,6 +222,8 @@ PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
@ -231,6 +232,8 @@ STRICT_CFLAGS = @STRICT_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
|
||||
VERSION = @VERSION@
|
||||
XFIXES_CFLAGS = @XFIXES_CFLAGS@
|
||||
XFIXES_LIBS = @XFIXES_LIBS@
|
||||
XI_CFLAGS = @XI_CFLAGS@
|
||||
XI_LIBS = @XI_LIBS@
|
||||
XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@
|
||||
@ -296,6 +299,7 @@ libmandir = $(LIB_MAN_DIR)
|
||||
|
||||
# Source files for X Input v2 man pages
|
||||
XI2_txt = \
|
||||
XIBarrierReleasePointer.txt \
|
||||
XIChangeHierarchy.txt \
|
||||
XIDefineCursor.txt \
|
||||
XIGrabButton.txt \
|
||||
@ -349,6 +353,7 @@ libman_xml = $(libman_txt:.txt=.xml)
|
||||
# They are created by the xmlto command when generating man pages from DocBook
|
||||
# The shadow man page contains a gtroff .so request to include the main man page
|
||||
XI2_shadows = \
|
||||
XIBarrierReleasePointers.man \
|
||||
XIUndefineCursor.man \
|
||||
XIUngrabButton.man \
|
||||
XIGrabKeycode.man \
|
||||
@ -397,7 +402,7 @@ all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .man .$(LIB_MAN_SUFFIX) .txt .xml
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
@ -422,9 +427,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
@ -642,6 +647,7 @@ uninstall-am: uninstall-libmanDATA
|
||||
@HAVE_DOCTOOLS_TRUE@XIUngrabEnter.man XIGrabFocusIn.man XIUngrabFocusIn.man: XIGrabEnter.man
|
||||
@HAVE_DOCTOOLS_TRUE@XIGetSelectedEvents.man: XISelectEvents.man
|
||||
@HAVE_DOCTOOLS_TRUE@XIFreeDeviceInfo.man: XIQueryDevice.man
|
||||
@HAVE_DOCTOOLS_TRUE@XIBarrierReleasePointers.man: XIBarrierReleasePointer.man
|
||||
.man.$(LIB_MAN_SUFFIX):
|
||||
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
|
||||
@HAVE_DOCTOOLS_TRUE@.txt.xml:
|
||||
|
164
lib/libXi/man/XIBarrierReleasePointer.man
Normal file
164
lib/libXi/man/XIBarrierReleasePointer.man
Normal file
@ -0,0 +1,164 @@
|
||||
'\" t
|
||||
.\" Title: xibarrierreleasepointer
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 05/30/2013
|
||||
.\" Manual: \ \&
|
||||
.\" Source: \ \&
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "XIBARRIERRELEASEPOIN" "libmansuffix" "05/30/2013" "\ \&" "\ \&"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
XIBarrierReleasePointer, XIBarrierReleasePointers \- allow pointer movement across a pointer barrier
|
||||
.SH "SYNOPSIS"
|
||||
.sp
|
||||
.nf
|
||||
#include <X11/extensions/XInput2\&.h>
|
||||
.fi
|
||||
.sp
|
||||
.nf
|
||||
int XIBarrierReleasePointer( Display *display,
|
||||
int deviceid,
|
||||
PointerBarrier barrier,
|
||||
BarrierEventID eventid);
|
||||
.fi
|
||||
.sp
|
||||
.nf
|
||||
int XIBarrierReleasePointers( Display *display,
|
||||
XIBarrierReleasePointerInfo *barriers,
|
||||
int num_barriers);
|
||||
.fi
|
||||
.sp
|
||||
.nf
|
||||
display
|
||||
Specifies the connection to the X server\&.
|
||||
.fi
|
||||
.sp
|
||||
.nf
|
||||
deviceid
|
||||
Specifies the device allowed to move across the barrier\&.
|
||||
.fi
|
||||
.sp
|
||||
.nf
|
||||
barrier
|
||||
Specifies the barrier\&.
|
||||
.fi
|
||||
.sp
|
||||
.nf
|
||||
eventid
|
||||
Specifies the unique event ID for this barrier event sequence\&.
|
||||
.fi
|
||||
.sp
|
||||
.nf
|
||||
barriers
|
||||
List of deviceid, barrier, eventid triplets\&.
|
||||
.fi
|
||||
.sp
|
||||
.nf
|
||||
num_barriers
|
||||
Number of elements in barriers\&.
|
||||
.fi
|
||||
.SH "DESCRIPTION"
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
If a pointer is constrained by a pointer barrier, release the pointer
|
||||
from the barrier and allow it to cross the barrier with the next motion\&.
|
||||
If the pointer moves away from the barrier, this request does nothing\&.
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
This request only releases the pointer for the given barrier event
|
||||
sequence\&. If the pointer moves away from or through the barrier, a
|
||||
XI_BarrierLeave event is generated\&. Future pointer movement constrained
|
||||
by this barrier will assign a new eventid and require a new
|
||||
XIBarrierReleasePointer request\&.
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
If the pointer is not currently blocked by the barrier or the barrier
|
||||
event sequence has ended, this request does nothing\&.
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
XIBarrierReleasePointer and XIBarrierReleasePointers can generate a
|
||||
BadDevice or BadValue error\&.
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.SH "DIAGNOSTICS"
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
BadDevice
|
||||
An invalid device was specified\&. The device does not
|
||||
exist or is not a master pointer device\&.
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
BadValue
|
||||
A value for a PointerBarrier argument does not name a defined
|
||||
pointer barrier\&.
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.SH "SEE ALSO"
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
XFixesCreatePointerBarrier(libmansuffix)
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
76
lib/libXi/man/XIBarrierReleasePointer.txt
Normal file
76
lib/libXi/man/XIBarrierReleasePointer.txt
Normal file
@ -0,0 +1,76 @@
|
||||
XIBARRIERRELEASEPOINTER(libmansuffix)
|
||||
=====================================
|
||||
|
||||
NAME
|
||||
----
|
||||
|
||||
XIBarrierReleasePointer, XIBarrierReleasePointers - allow pointer movement across a pointer barrier
|
||||
|
||||
SYNOPSIS
|
||||
--------
|
||||
|
||||
#include <X11/extensions/XInput2.h>
|
||||
|
||||
int XIBarrierReleasePointer( Display *display,
|
||||
int deviceid,
|
||||
PointerBarrier barrier,
|
||||
BarrierEventID eventid);
|
||||
|
||||
int XIBarrierReleasePointers( Display *display,
|
||||
XIBarrierReleasePointerInfo *barriers,
|
||||
int num_barriers);
|
||||
|
||||
display
|
||||
Specifies the connection to the X server.
|
||||
|
||||
deviceid
|
||||
Specifies the device allowed to move across the barrier.
|
||||
|
||||
barrier
|
||||
Specifies the barrier.
|
||||
|
||||
eventid
|
||||
Specifies the unique event ID for this barrier event sequence.
|
||||
|
||||
barriers
|
||||
List of deviceid, barrier, eventid triplets.
|
||||
|
||||
num_barriers
|
||||
Number of elements in barriers.
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
||||
If a pointer is constrained by a pointer barrier, release the pointer
|
||||
from the barrier and allow it to cross the barrier with the next motion.
|
||||
If the pointer moves away from the barrier, this request does nothing.
|
||||
|
||||
This request only releases the pointer for the given barrier event
|
||||
sequence. If the pointer moves away from or through the barrier, a
|
||||
XI_BarrierLeave event is generated. Future pointer movement constrained
|
||||
by this barrier will assign a new eventid and require a new
|
||||
XIBarrierReleasePointer request.
|
||||
|
||||
If the pointer is not currently blocked by the barrier or the barrier
|
||||
event sequence has ended, this request does nothing.
|
||||
|
||||
XIBarrierReleasePointer and XIBarrierReleasePointers can generate a
|
||||
BadDevice or BadValue error.
|
||||
|
||||
DIAGNOSTICS
|
||||
-----------
|
||||
|
||||
BadDevice
|
||||
An invalid device was specified. The device does not
|
||||
exist or is not a master pointer device.
|
||||
|
||||
BadValue
|
||||
A value for a PointerBarrier argument does not name a defined
|
||||
pointer barrier.
|
||||
|
||||
See also
|
||||
--------
|
||||
|
||||
XFixesCreatePointerBarrier(libmansuffix)
|
||||
|
||||
|
1
lib/libXi/man/XIBarrierReleasePointers.man
Normal file
1
lib/libXi/man/XIBarrierReleasePointers.man
Normal file
@ -0,0 +1 @@
|
||||
.so manlibmansuffix/XIBarrierReleasePointer.libmansuffix
|
@ -188,7 +188,6 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
@ -211,6 +210,8 @@ PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
@ -219,6 +220,8 @@ STRICT_CFLAGS = @STRICT_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
|
||||
VERSION = @VERSION@
|
||||
XFIXES_CFLAGS = @XFIXES_CFLAGS@
|
||||
XFIXES_LIBS = @XFIXES_LIBS@
|
||||
XI_CFLAGS = @XI_CFLAGS@
|
||||
XI_LIBS = @XI_LIBS@
|
||||
XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@
|
||||
@ -349,7 +352,7 @@ top_srcdir = @top_srcdir@
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/docbook.am $(am__configure_deps)
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/docbook.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
@ -375,9 +378,9 @@ $(top_srcdir)/docbook.am:
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
|
@ -13,7 +13,8 @@ XI2_sources = XIAllowEvents.c \
|
||||
XIWarpPointer.c \
|
||||
XIHierarchy.c \
|
||||
XIDefineCursor.c \
|
||||
XIQueryPointer.c
|
||||
XIQueryPointer.c \
|
||||
XIBarrier.c
|
||||
|
||||
libXi_la_SOURCES = \
|
||||
XAllowDv.c \
|
||||
@ -69,6 +70,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/include/X11/extensions
|
||||
|
||||
AM_CFLAGS = $(XI_CFLAGS) \
|
||||
$(XFIXES_CFLAGS) \
|
||||
$(MALLOC_ZERO_CFLAGS) \
|
||||
$(CWARNFLAGS)
|
||||
|
||||
|
@ -98,7 +98,7 @@ am__objects_1 = XIAllowEvents.lo XIGrabDevice.lo XIQueryVersion.lo \
|
||||
XIQueryDevice.lo XISetDevFocus.lo XIGetDevFocus.lo \
|
||||
XIPassiveGrab.lo XIProperties.lo XISelEv.lo XISetCPtr.lo \
|
||||
XIWarpPointer.lo XIHierarchy.lo XIDefineCursor.lo \
|
||||
XIQueryPointer.lo
|
||||
XIQueryPointer.lo XIBarrier.lo
|
||||
am_libXi_la_OBJECTS = XAllowDv.lo XChDProp.lo XChgDCtl.lo XChgFCtl.lo \
|
||||
XChgKbd.lo XChgKMap.lo XChgPnt.lo XChgProp.lo XCloseDev.lo \
|
||||
XDelDProp.lo XDevBell.lo XExtToWire.lo XGetBMap.lo XGetCPtr.lo \
|
||||
@ -216,7 +216,6 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
@ -239,6 +238,8 @@ PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
@ -247,6 +248,8 @@ STRICT_CFLAGS = @STRICT_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
|
||||
VERSION = @VERSION@
|
||||
XFIXES_CFLAGS = @XFIXES_CFLAGS@
|
||||
XFIXES_LIBS = @XFIXES_LIBS@
|
||||
XI_CFLAGS = @XI_CFLAGS@
|
||||
XI_LIBS = @XI_LIBS@
|
||||
XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@
|
||||
@ -322,7 +325,8 @@ XI2_sources = XIAllowEvents.c \
|
||||
XIWarpPointer.c \
|
||||
XIHierarchy.c \
|
||||
XIDefineCursor.c \
|
||||
XIQueryPointer.c
|
||||
XIQueryPointer.c \
|
||||
XIBarrier.c
|
||||
|
||||
libXi_la_SOURCES = \
|
||||
XAllowDv.c \
|
||||
@ -376,6 +380,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/include/X11/extensions
|
||||
|
||||
AM_CFLAGS = $(XI_CFLAGS) \
|
||||
$(XFIXES_CFLAGS) \
|
||||
$(MALLOC_ZERO_CFLAGS) \
|
||||
$(CWARNFLAGS)
|
||||
|
||||
@ -390,7 +395,7 @@ all: config.h
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
@ -415,9 +420,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
@ -428,7 +433,7 @@ config.h: stamp-h1
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status src/config.h
|
||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
@ -507,6 +512,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XGtFocus.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XGtSelect.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XIAllowEvents.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XIBarrier.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XIDefineCursor.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XIGetDevFocus.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XIGrabDevice.Plo@am__quote@
|
||||
|
@ -73,40 +73,11 @@ SOFTWARE.
|
||||
#define DONT_ENQUEUE False
|
||||
#define FP1616toDBL(x) ((x) * 1.0 / (1 << 16))
|
||||
|
||||
extern void _xibaddevice(
|
||||
Display * /* dpy */,
|
||||
int * /* error */
|
||||
);
|
||||
|
||||
extern void _xibadclass(
|
||||
Display * /* dpy */,
|
||||
int * /* error */
|
||||
);
|
||||
|
||||
extern void _xibadevent(
|
||||
Display * /* dpy */,
|
||||
int * /* error */
|
||||
);
|
||||
|
||||
extern void _xibadmode(
|
||||
Display * /* dpy */,
|
||||
int * /* error */
|
||||
);
|
||||
|
||||
extern void _xidevicebusy(
|
||||
Display * /* dpy */,
|
||||
int * /* error */
|
||||
);
|
||||
|
||||
extern int _XiGetDevicePresenceNotifyEvent(
|
||||
Display * /* dpy */
|
||||
);
|
||||
|
||||
int copy_classes(XIDeviceInfo *to, xXIAnyInfo* from, int *nclasses);
|
||||
int size_classes(xXIAnyInfo* from, int nclasses);
|
||||
|
||||
static XExtensionInfo *xinput_info;
|
||||
static /* const */ char *xinput_extension_name = INAME;
|
||||
static const char *xinput_extension_name = INAME;
|
||||
|
||||
static int XInputClose(
|
||||
Display * /* dpy */,
|
||||
@ -153,6 +124,9 @@ wireToPropertyEvent(xXIPropertyEvent *in, XGenericEventCookie *cookie);
|
||||
static int
|
||||
wireToTouchOwnershipEvent(xXITouchOwnershipEvent *in,
|
||||
XGenericEventCookie *cookie);
|
||||
static int
|
||||
wireToBarrierEvent(xXIBarrierEvent *in,
|
||||
XGenericEventCookie *cookie);
|
||||
|
||||
static /* const */ XEvent emptyevent;
|
||||
|
||||
@ -172,7 +146,7 @@ static /* const */ XExtensionHooks xinput_extension_hooks = {
|
||||
XInputError, /* error_string */
|
||||
};
|
||||
|
||||
static char *XInputErrorList[] = {
|
||||
static const char *XInputErrorList[] = {
|
||||
"BadDevice, invalid or uninitialized input device", /* BadDevice */
|
||||
"BadEvent, invalid event type", /* BadEvent */
|
||||
"BadMode, invalid mode parameter", /* BadMode */
|
||||
@ -496,7 +470,6 @@ XInputWireToEvent(
|
||||
xEvent *event)
|
||||
{
|
||||
unsigned int type, reltype;
|
||||
unsigned int i, j;
|
||||
XExtDisplayInfo *info = XInput_find_display(dpy);
|
||||
XEvent *save = (XEvent *) info->data;
|
||||
|
||||
@ -621,6 +594,7 @@ XInputWireToEvent(
|
||||
{
|
||||
deviceValuator *xev = (deviceValuator *) event;
|
||||
int save_type = save->type - info->codes->first_event;
|
||||
int i;
|
||||
|
||||
if (save_type == XI_DeviceKeyPress || save_type == XI_DeviceKeyRelease) {
|
||||
XDeviceKeyEvent *kev = (XDeviceKeyEvent *) save;
|
||||
@ -716,6 +690,7 @@ XInputWireToEvent(
|
||||
pev->axis_data[0] = xev->valuator0;
|
||||
}
|
||||
} else if (save_type == XI_DeviceStateNotify) {
|
||||
int j;
|
||||
XDeviceStateNotifyEvent *sev = (XDeviceStateNotifyEvent *) save;
|
||||
XInputClass *any = (XInputClass *) & sev->data[0];
|
||||
XValuatorStatus *v;
|
||||
@ -760,6 +735,7 @@ XInputWireToEvent(
|
||||
break;
|
||||
case XI_DeviceStateNotify:
|
||||
{
|
||||
int j;
|
||||
XDeviceStateNotifyEvent *stev = (XDeviceStateNotifyEvent *) save;
|
||||
deviceStateNotify *sev = (deviceStateNotify *) event;
|
||||
char *data;
|
||||
@ -1049,6 +1025,16 @@ XInputWireToCookie(
|
||||
break;
|
||||
}
|
||||
return ENQUEUE_EVENT;
|
||||
case XI_BarrierHit:
|
||||
case XI_BarrierLeave:
|
||||
*cookie = *(XGenericEventCookie*)save;
|
||||
if (!wireToBarrierEvent((xXIBarrierEvent*)event, cookie))
|
||||
{
|
||||
printf("XInputWireToCookie: CONVERSION FAILURE! evtype=%d\n",
|
||||
ge->evtype);
|
||||
break;
|
||||
}
|
||||
return ENQUEUE_EVENT;
|
||||
default:
|
||||
printf("XInputWireToCookie: Unknown generic event. type %d\n", ge->evtype);
|
||||
|
||||
@ -1430,7 +1416,21 @@ copyRawEvent(XGenericEventCookie *cookie_in,
|
||||
return True;
|
||||
}
|
||||
|
||||
static Bool
|
||||
copyBarrierEvent(XGenericEventCookie *in_cookie,
|
||||
XGenericEventCookie *out_cookie)
|
||||
{
|
||||
XIBarrierEvent *in, *out;
|
||||
|
||||
in = in_cookie->data;
|
||||
|
||||
out = out_cookie->data = calloc(1, sizeof(XIBarrierEvent));
|
||||
if (!out)
|
||||
return False;
|
||||
*out = *in;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
static Bool
|
||||
XInputCopyCookie(Display *dpy, XGenericEventCookie *in, XGenericEventCookie *out)
|
||||
@ -1489,6 +1489,10 @@ XInputCopyCookie(Display *dpy, XGenericEventCookie *in, XGenericEventCookie *out
|
||||
case XI_RawTouchEnd:
|
||||
ret = copyRawEvent(in, out);
|
||||
break;
|
||||
case XI_BarrierHit:
|
||||
case XI_BarrierLeave:
|
||||
ret = copyBarrierEvent(in, out);
|
||||
break;
|
||||
default:
|
||||
printf("XInputCopyCookie: unknown evtype %d\n", in->evtype);
|
||||
ret = False;
|
||||
@ -1995,3 +1999,35 @@ wireToTouchOwnershipEvent(xXITouchOwnershipEvent *in,
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define FP3232_TO_DOUBLE(x) ((double) (x).integral + (x).frac / (1ULL << 32))
|
||||
|
||||
static int
|
||||
wireToBarrierEvent(xXIBarrierEvent *in, XGenericEventCookie *cookie)
|
||||
{
|
||||
XIBarrierEvent *out = malloc(sizeof(XIBarrierEvent));
|
||||
|
||||
cookie->data = out;
|
||||
|
||||
out->display = cookie->display;
|
||||
out->type = in->type;
|
||||
out->serial = in->sequenceNumber;
|
||||
out->extension = in->extension;
|
||||
out->evtype = in->evtype;
|
||||
out->send_event = ((in->type & 0x80) != 0);
|
||||
out->time = in->time;
|
||||
out->deviceid = in->deviceid;
|
||||
out->sourceid = in->sourceid;
|
||||
out->event = in->event;
|
||||
out->root = in->root;
|
||||
out->root_x = FP1616toDBL(in->root_x);
|
||||
out->root_y = FP1616toDBL(in->root_y);
|
||||
out->dx = FP3232_TO_DOUBLE (in->dx);
|
||||
out->dy = FP3232_TO_DOUBLE (in->dy);
|
||||
out->dtime = in->dtime;
|
||||
out->flags = in->flags;
|
||||
out->barrier = in->barrier;
|
||||
out->eventid = in->eventid;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -122,34 +122,34 @@ XGetDeviceControl(
|
||||
val_size = 3 * sizeof(int) * r->num_valuators;
|
||||
if ((sizeof(xDeviceResolutionState) + val_size) > nbytes)
|
||||
goto out;
|
||||
size += sizeof(XDeviceResolutionState) + val_size;
|
||||
size = sizeof(XDeviceResolutionState) + val_size;
|
||||
break;
|
||||
}
|
||||
case DEVICE_ABS_CALIB:
|
||||
{
|
||||
if (sizeof(xDeviceAbsCalibState) > nbytes)
|
||||
goto out;
|
||||
size += sizeof(XDeviceAbsCalibState);
|
||||
size = sizeof(XDeviceAbsCalibState);
|
||||
break;
|
||||
}
|
||||
case DEVICE_ABS_AREA:
|
||||
{
|
||||
if (sizeof(xDeviceAbsAreaState) > nbytes)
|
||||
goto out;
|
||||
size += sizeof(XDeviceAbsAreaState);
|
||||
size = sizeof(XDeviceAbsAreaState);
|
||||
break;
|
||||
}
|
||||
case DEVICE_CORE:
|
||||
{
|
||||
if (sizeof(xDeviceCoreState) > nbytes)
|
||||
goto out;
|
||||
size += sizeof(XDeviceCoreState);
|
||||
size = sizeof(XDeviceCoreState);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (d->length > nbytes)
|
||||
goto out;
|
||||
size += d->length;
|
||||
size = d->length;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -125,9 +125,6 @@ XGetFeedbackControl(
|
||||
case StringFeedbackClass:
|
||||
{
|
||||
xStringFeedbackState *strf = (xStringFeedbackState *) f;
|
||||
|
||||
if (strf->num_syms_supported >= (INT_MAX / sizeof(KeySym)))
|
||||
goto out;
|
||||
size += sizeof(XStringFeedbackState) +
|
||||
(strf->num_syms_supported * sizeof(KeySym));
|
||||
}
|
||||
@ -195,18 +192,18 @@ XGetFeedbackControl(
|
||||
}
|
||||
case IntegerFeedbackClass:
|
||||
{
|
||||
xIntegerFeedbackState *i;
|
||||
xIntegerFeedbackState *ifs;
|
||||
XIntegerFeedbackState *I;
|
||||
|
||||
i = (xIntegerFeedbackState *) f;
|
||||
ifs = (xIntegerFeedbackState *) f;
|
||||
I = (XIntegerFeedbackState *) Feedback;
|
||||
|
||||
I->class = i->class;
|
||||
I->class = ifs->class;
|
||||
I->length = sizeof(XIntegerFeedbackState);
|
||||
I->id = i->id;
|
||||
I->resolution = i->resolution;
|
||||
I->minVal = i->min_value;
|
||||
I->maxVal = i->max_value;
|
||||
I->id = ifs->id;
|
||||
I->resolution = ifs->resolution;
|
||||
I->minVal = ifs->min_value;
|
||||
I->maxVal = ifs->max_value;
|
||||
break;
|
||||
}
|
||||
case StringFeedbackClass:
|
||||
|
@ -104,8 +104,10 @@ XGetDeviceDontPropagateList(
|
||||
_XRead(dpy, (char *)(&ec), sizeof(CARD32));
|
||||
list[i] = (XEventClass) ec;
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
*count = 0;
|
||||
_XEatDataWords(dpy, rep.length);
|
||||
}
|
||||
}
|
||||
|
||||
UnlockDisplay(dpy);
|
||||
|
81
lib/libXi/src/XIBarrier.c
Normal file
81
lib/libXi/src/XIBarrier.c
Normal file
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright © 2009 Red Hat, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* 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 AUTHORS OR COPYRIGHT HOLDERS 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/extensions/XI2proto.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
#include "XIint.h"
|
||||
|
||||
void
|
||||
XIBarrierReleasePointers(Display *dpy,
|
||||
XIBarrierReleasePointerInfo *barriers,
|
||||
int num_barriers)
|
||||
{
|
||||
XExtDisplayInfo *info = XInput_find_display(dpy);
|
||||
xXIBarrierReleasePointerReq *req;
|
||||
int extra = 0;
|
||||
int i;
|
||||
xXIBarrierReleasePointerInfo *b;
|
||||
|
||||
if (!num_barriers)
|
||||
return;
|
||||
|
||||
extra = (num_barriers * sizeof(xXIBarrierReleasePointerInfo));
|
||||
|
||||
LockDisplay (dpy);
|
||||
GetReqExtra (XIBarrierReleasePointer, extra, req);
|
||||
req->reqType = info->codes->major_opcode;
|
||||
req->ReqType = X_XIBarrierReleasePointer;
|
||||
req->num_barriers = num_barriers;
|
||||
|
||||
b = (xXIBarrierReleasePointerInfo *) &req[1];
|
||||
for (i = 0; i < num_barriers; i++, b++) {
|
||||
b->deviceid = barriers[i].deviceid;
|
||||
b->eventid = barriers[i].eventid;
|
||||
b->barrier = barriers[i].barrier;
|
||||
}
|
||||
|
||||
UnlockDisplay (dpy);
|
||||
SyncHandle ();
|
||||
}
|
||||
|
||||
void
|
||||
XIBarrierReleasePointer(Display *dpy,
|
||||
int deviceid,
|
||||
PointerBarrier barrier,
|
||||
BarrierEventID eventid)
|
||||
{
|
||||
XIBarrierReleasePointerInfo info;
|
||||
info.deviceid = deviceid;
|
||||
info.barrier = barrier;
|
||||
info.eventid = eventid;
|
||||
|
||||
XIBarrierReleasePointers(dpy, &info, 1);
|
||||
}
|
@ -31,6 +31,7 @@
|
||||
#include <X11/extensions/XI2proto.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
#include <limits.h>
|
||||
#include "XIint.h"
|
||||
|
||||
|
||||
@ -50,6 +51,17 @@ XIGrabDevice(Display* dpy, int deviceid, Window grab_window, Time time,
|
||||
if (_XiCheckExtInit(dpy, XInput_2_0, extinfo) == -1)
|
||||
return (NoSuchExtension);
|
||||
|
||||
if (mask->mask_len > INT_MAX - 3 ||
|
||||
(mask->mask_len + 3)/4 >= 0xffff)
|
||||
return BadValue;
|
||||
|
||||
/* mask->mask_len is in bytes, but we need 4-byte units on the wire,
|
||||
* and they need to be padded with 0 */
|
||||
len = (mask->mask_len + 3)/4;
|
||||
buff = calloc(4, len);
|
||||
if (!buff)
|
||||
return BadAlloc;
|
||||
|
||||
GetReq(XIGrabDevice, req);
|
||||
req->reqType = extinfo->codes->major_opcode;
|
||||
req->ReqType = X_XIGrabDevice;
|
||||
@ -59,14 +71,9 @@ XIGrabDevice(Display* dpy, int deviceid, Window grab_window, Time time,
|
||||
req->grab_mode = grab_mode;
|
||||
req->paired_device_mode = paired_device_mode;
|
||||
req->owner_events = owner_events;
|
||||
req->mask_len = (mask->mask_len + 3)/4;
|
||||
req->mask_len = len;
|
||||
req->cursor = cursor;
|
||||
|
||||
|
||||
/* mask->mask_len is in bytes, but we need 4-byte units on the wire,
|
||||
* and they need to be padded with 0 */
|
||||
len = req->mask_len;
|
||||
buff = calloc(1, len * 4);
|
||||
memcpy(buff, mask->mask, mask->mask_len);
|
||||
|
||||
SetReqLen(req, len, len);
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <X11/extensions/XI2proto.h>
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
#include <limits.h>
|
||||
#include "XIint.h"
|
||||
|
||||
static int
|
||||
@ -51,6 +52,14 @@ _XIPassiveGrabDevice(Display* dpy, int deviceid, int grabtype, int detail,
|
||||
if (_XiCheckExtInit(dpy, XInput_2_0, extinfo) == -1)
|
||||
return -1;
|
||||
|
||||
if (mask->mask_len > INT_MAX - 3 ||
|
||||
(mask->mask_len + 3)/4 >= 0xffff)
|
||||
return -1;
|
||||
|
||||
buff = calloc(4, (mask->mask_len + 3)/4);
|
||||
if (!buff)
|
||||
return -1;
|
||||
|
||||
GetReq(XIPassiveGrabDevice, req);
|
||||
req->reqType = extinfo->codes->major_opcode;
|
||||
req->ReqType = X_XIPassiveGrabDevice;
|
||||
@ -68,7 +77,6 @@ _XIPassiveGrabDevice(Display* dpy, int deviceid, int grabtype, int detail,
|
||||
len = req->mask_len + num_modifiers;
|
||||
SetReqLen(req, len, len);
|
||||
|
||||
buff = calloc(4, req->mask_len);
|
||||
memcpy(buff, mask->mask, mask->mask_len);
|
||||
Data(dpy, buff, req->mask_len * 4);
|
||||
for (i = 0; i < num_modifiers; i++)
|
||||
|
@ -60,15 +60,15 @@ _xiQueryVersion(Display * dpy, int *major, int *minor, XExtDisplayInfo *info)
|
||||
if (_XiCheckExtInit(dpy, XInput_2_0, info) == -1)
|
||||
{
|
||||
XExtensionVersion *ext;
|
||||
XExtDisplayInfo *info = XInput_find_display(dpy);
|
||||
XExtDisplayInfo *extinfo = XInput_find_display(dpy);
|
||||
|
||||
if (!info || !info->data) {
|
||||
if (!extinfo || !extinfo->data) {
|
||||
*major = 0;
|
||||
*minor = 0;
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
ext = ((XInputData*)info->data)->vers;
|
||||
ext = ((XInputData*)extinfo->data)->vers;
|
||||
|
||||
*major = ext->major_version;
|
||||
*minor = ext->minor_version;
|
||||
|
@ -53,6 +53,8 @@ XISelectEvents(Display* dpy, Window win, XIEventMask* masks, int num_masks)
|
||||
int i;
|
||||
int len = 0;
|
||||
int r = Success;
|
||||
int max_mask_len = 0;
|
||||
char *buff;
|
||||
|
||||
XExtDisplayInfo *info = XInput_find_display(dpy);
|
||||
LockDisplay(dpy);
|
||||
@ -60,6 +62,26 @@ XISelectEvents(Display* dpy, Window win, XIEventMask* masks, int num_masks)
|
||||
r = NoSuchExtension;
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_masks; i++) {
|
||||
current = &masks[i];
|
||||
if (current->mask_len > INT_MAX - 3 ||
|
||||
(current->mask_len + 3)/4 >= 0xffff) {
|
||||
r = -1;
|
||||
goto out;
|
||||
}
|
||||
if (current->mask_len > max_mask_len)
|
||||
max_mask_len = current->mask_len;
|
||||
}
|
||||
|
||||
/* max_mask_len is in bytes, but we need 4-byte units on the wire,
|
||||
* and they need to be padded with 0 */
|
||||
buff = calloc(4, ((max_mask_len + 3)/4));
|
||||
if (!buff) {
|
||||
r = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
GetReq(XISelectEvents, req);
|
||||
|
||||
req->reqType = info->codes->major_opcode;
|
||||
@ -79,19 +101,17 @@ XISelectEvents(Display* dpy, Window win, XIEventMask* masks, int num_masks)
|
||||
|
||||
for (i = 0; i < num_masks; i++)
|
||||
{
|
||||
char *buff;
|
||||
current = &masks[i];
|
||||
mask.deviceid = current->deviceid;
|
||||
mask.mask_len = (current->mask_len + 3)/4;
|
||||
/* masks.mask_len is in bytes, but we need 4-byte units on the wire,
|
||||
* and they need to be padded with 0 */
|
||||
buff = calloc(1, mask.mask_len * 4);
|
||||
|
||||
memset(buff, 0, max_mask_len);
|
||||
memcpy(buff, current->mask, current->mask_len);
|
||||
Data(dpy, (char*)&mask, sizeof(xXIEventMask));
|
||||
Data(dpy, buff, mask.mask_len * 4);
|
||||
free(buff);
|
||||
}
|
||||
|
||||
free(buff);
|
||||
out:
|
||||
UnlockDisplay(dpy);
|
||||
SyncHandle();
|
||||
|
@ -22,6 +22,7 @@
|
||||
#endif
|
||||
#define XInput_2_1 8
|
||||
#define XInput_2_2 9
|
||||
#define XInput_2_3 10
|
||||
|
||||
extern XExtDisplayInfo *XInput_find_display(Display *);
|
||||
|
||||
|
@ -107,7 +107,7 @@ SizeClassInfo(xAnyClassPtr *any, int num_classes)
|
||||
static void
|
||||
ParseClassInfo(xAnyClassPtr *any, XAnyClassPtr *Any, int num_classes)
|
||||
{
|
||||
int j, k;
|
||||
int j;
|
||||
|
||||
for (j = 0; j < num_classes; j++) {
|
||||
switch ((*any)->class) {
|
||||
@ -135,6 +135,7 @@ ParseClassInfo(xAnyClassPtr *any, XAnyClassPtr *Any, int num_classes)
|
||||
}
|
||||
case ValuatorClass:
|
||||
{
|
||||
int k;
|
||||
XValuatorInfoPtr V = (XValuatorInfoPtr) *Any;
|
||||
xValuatorInfoPtr v = (xValuatorInfoPtr) *any;
|
||||
XAxisInfoPtr A;
|
||||
|
@ -7,6 +7,6 @@ Name: Xi
|
||||
Description: X Input Extension Library
|
||||
Version: @VERSION@
|
||||
Requires: inputproto
|
||||
Requires.private: x11 xext
|
||||
Requires.private: x11 xext xfixes
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lXi
|
||||
|
Loading…
Reference in New Issue
Block a user