diff options
Diffstat (limited to 'dist')
-rw-r--r-- | dist/libxcb/ChangeLog | 222 | ||||
-rw-r--r-- | dist/libxcb/Makefile.am | 3 | ||||
-rw-r--r-- | dist/libxcb/NEWS | 9 | ||||
-rw-r--r-- | dist/libxcb/build-aux/compile | 9 | ||||
-rw-r--r-- | dist/libxcb/build-aux/test-driver | 6 | ||||
-rw-r--r-- | dist/libxcb/compile | 347 | ||||
-rw-r--r-- | dist/libxcb/configure.ac | 9 | ||||
-rw-r--r-- | dist/libxcb/m4/libtool.m4 | 32 | ||||
-rw-r--r-- | dist/libxcb/src/Makefile.am | 7 | ||||
-rw-r--r-- | dist/libxcb/src/c_client.py | 107 | ||||
-rw-r--r-- | dist/libxcb/src/xcb.h | 76 | ||||
-rw-r--r-- | dist/libxcb/src/xcb_in.c | 6 | ||||
-rw-r--r-- | dist/libxcb/src/xcb_util.c | 2 | ||||
-rw-r--r-- | dist/libxcb/src/xcbext.h | 102 | ||||
-rw-r--r-- | dist/libxcb/xcb-ge.pc.in | 11 |
15 files changed, 438 insertions, 510 deletions
diff --git a/dist/libxcb/ChangeLog b/dist/libxcb/ChangeLog index 1b3ad5ee4..2a2896502 100644 --- a/dist/libxcb/ChangeLog +++ b/dist/libxcb/ChangeLog @@ -1,3 +1,193 @@ +commit 7e0f166579672d71efd819c81f0c932b0acd542c +Author: Daniel Stone <daniels@collabora.com> +Date: Wed Feb 28 01:26:55 2018 +0000 + + Release libxcb 1.13 + + Signed-off-by: Daniel Stone <daniels@collabora.com> + +commit a3e9821bec08a69b355b46b0655562b9df61bb21 +Author: Daniel Stone <daniels@collabora.com> +Date: Wed Apr 26 17:55:54 2017 +0200 + + c_client: Add support for lists of FDs + + Matching xcbgen changes, add support having a ListType which contains + file descriptors. Use this to send a variable number of FDs to the + server, including when the list size is not fixed. + + Signed-off-by: Daniel Stone <daniels@collabora.com> + +commit c7aa4e682fdc7f0035f928af6eafd052e38cc15a +Author: Daniel Stone <daniels@collabora.com> +Date: Wed Apr 26 17:54:01 2017 +0200 + + c_client: Don't serialise non-wire fields + + For when we have a variable-sized field followed by a fixed field, make + sure we do not serialise non-wire fields. + + Signed-off-by: Daniel Stone <daniels@collabora.com> + +commit d10194a321c3db851b3ede9a98cdc95e951943aa +Author: Christian Linhart <chris@demorecorder.com> +Date: Sat Mar 11 22:03:34 2017 +0100 + + enable xinput by default + + Support for the xinput extension is complete now, + as far as I can tell. + + According to our discussion on the list, we enable it now. + + Signed-off-by: Christian Linhart <chris@demorecorder.com> + +commit fad81b63422105f9345215ab2716c4b804ec7986 +Author: David McFarland <corngood@gmail.com> +Date: Tue Apr 18 23:58:59 2017 -0300 + + read from connection when polling special events and replies + + Using the mesa vulkan driver, if you acquire an image from a + swapchain using a finite timeout (x11_acquire_next_image_poll_x11), + it will occasionally lock, calling xcb_poll_for_special_event in + a loop until the timeout expires. + + Call _xcb_in_read() once from the polling functions for special + events and replies, in the same way as xcb_poll_for_event. + + Signed-off-by: David McFarland <corngood@gmail.com> + Signed-off-by: Uli Schlachter <psychon@znc.in> + +commit f830eb93c9c38b2c6c7ea2971af3bc6a61e92277 +Author: Tobias Stoeckmann <tobias@stoeckmann.org> +Date: Sun Mar 26 15:41:12 2017 +0200 + + Check strdup for NULL return value. + + _xcb_open does not check strdup's return value for NULL if launchd suport + was configured. + + Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> + Signed-off-by: Uli Schlachter <psychon@znc.in> + +commit ee9dfc9a7658e7fe75d27483bb5ed1ba4d1e2c86 +Author: Christian Linhart <chris@demorecorder.com> +Date: Wed Jan 25 10:21:05 2017 +0100 + + add support for eventstruct + + eventstruct allows to use events as part of requests. + This is, e.g., needed by xcb_input_send_extension_event. + + Signed-off-by: Christian Linhart <chris@demorecorder.com> + +commit 0c2c5d50f8670da3e7601feb6a29b53509513da5 +Author: Christian Linhart <chris@demorecorder.com> +Date: Fri Jan 20 20:14:57 2017 +0100 + + optionally build the GE extension + + xcb contains an xml-definition for the GenericEvent extension + but this extension was neither generated nor built. + + This patch enables optional building of the GenericEvent extension + with configure option --enable-ge + + By default, the GenericEvent extension is not built. + Normally this is not needed by application programs + because there is implicit support for the GE-extension + for the specific events built with this extension. + + But it may be useful for X-protocol analyzers and stuff like that. + + Signed-off-by: Christian Linhart <chris@demorecorder.com> + +commit 9bce1f72e329cb407b7a95589b9675a08129b65d +Author: Christian Linhart <chris@demorecorder.com> +Date: Fri Jan 20 14:40:25 2017 +0100 + + move symbol lookup of sumof expr to the parser + + replace the complicated symboltable lookup for sumof expr + by accessing the lenfield of the expr-object. + + This requires the corresponding patch for xcb/proto + which sets the lenfield accordingly. + + This should be OK because for official releases we define + that dependency in the build system. + + For getting versions off the HEAD of the git repo, it should + be obvious that xcb/proto and xcb/libxcb have to be updated together. + + I have tested this patch and it generates exactly the same code + as before. + + Tested-by: Christian Linhart <chris@demorecorder.com> + Signed-off-by: Christian Linhart <chris@demorecorder.com> + +commit 65b298c7ca317d7e4316aa2b9e0499e13047c65c +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Feb 6 12:26:21 2016 -0800 + + Correct @param "e" to "error" in xcb_poll_for_reply*() + + Found by clang -Wdocumentation: + + ./xcbext.h:271:11: warning: parameter 'e' not found in the function + declaration [-Wdocumentation] + * @param e Location to store errors in, or NULL. Ignored for un... + ^ + ./xcbext.h:271:11: note: did you mean 'error'? + * @param e Location to store errors in, or NULL. Ignored for un... + ^ + error + + ./xcbext.h:283:11: warning: parameter 'e' not found in the function + declaration [-Wdocumentation] + * @param e Location to store errors in, or NULL. Ignored for un... + ^ + ./xcbext.h:283:11: note: did you mean 'error'? + * @param e Location to store errors in, or NULL. Ignored for un... + ^ + error + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Uli Schlachter <psychon@znc.in> + +commit 32a9084546add979115a686f9a167e70b8967149 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Feb 6 12:26:20 2016 -0800 + + Remove : from @param names in manually written headers + + Makes style match the @param names in autogenerated headers and makes + clang -Wdocumentation stop complaining about all of them: + + ./xcb.h:523:11: warning: parameter 'display:' not found in the function + declaration [-Wdocumentation] + * @param display: A pointer to the display number. + ^~~~~~~~ + ./xcb.h:523:11: note: did you mean 'display'? + * @param display: A pointer to the display number. + ^~~~~~~~ + display + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Uli Schlachter <psychon@znc.in> + +commit 8740a288ca468433141341347aa115b9544891d3 +Author: Thomas Klausner <wiz@NetBSD.org> +Date: Thu May 19 17:31:18 2016 +0200 + + Fix inconsistent use of tabs vs. space. + + Needed for at least python-3.5.x. + + Signed-off-by: Thomas Klausner <wiz@NetBSD.org> + Signed-off-by: Uli Schlachter <psychon@znc.in> + commit d34785a34f28fa6a00f8ce00d87e3132ff0f6467 Author: Uli Schlachter <psychon@znc.in> Date: Sat May 14 10:36:54 2016 +0200 @@ -810,12 +1000,12 @@ Date: Sun Nov 2 13:46:16 2014 +0100 <struct name="SumofTest_FieldAccess"> <field type="CARD32" name="len" /> <list type="SumofTest_Element" name="mylist1"> - <fieldref>len</fieldref> + <fieldref>len</fieldref> </list> <list type="CARD16" name="mylist2"> - <sumof ref="mylist1"> - <fieldref>bar</fieldref> - </sumof> + <sumof ref="mylist1"> + <fieldref>bar</fieldref> + </sumof> </list> </struct> @@ -873,10 +1063,10 @@ Date: Sun Nov 2 13:45:40 2014 +0100 <struct name="SumofTest"> <field type="CARD32" name="len" /> <list type="CARD16" name="mylist1"> - <fieldref>len</fieldref> + <fieldref>len</fieldref> </list> <list type="CARD8" name="mylist2"> - <sumof ref="mylist1"/> + <sumof ref="mylist1"/> </list> </struct> @@ -1245,12 +1435,12 @@ Date: Tue Aug 19 15:57:34 2014 +0200 flexibility in the following forms: * a case value may appear in multiple case branches. for example: - case C1 will be selected by values 1, 4, or 5 - case C2 will be selected by values 3, 4, or 7 + case C1 will be selected by values 1, 4, or 5 + case C2 will be selected by values 3, 4, or 7 * mixing of bitcase and case is possible - (this will usually make no sense but there may - be protocol specs where this is needed) + (this will usually make no sense but there may + be protocol specs where this is needed) details of the impl: * replaced "is_bitcase" with "is_case_or_bitcase" in all places @@ -1352,7 +1542,7 @@ Date: Wed Mar 26 15:24:44 2014 -0400 The implementation variable $sendfds leaked into the user interface. Testing the various user inputs: <nothing> DRI3 is enabled PASS - --enable-dri3 DRI3 is enabled PASS + --enable-dri3 DRI3 is enabled PASS --enable-dri3=yes DRI3 is enabled PASS --enable-dri3=no DRI3 is disabled PASS --disable-dri3 DRI3 is disabled PASS @@ -2106,7 +2296,7 @@ Date: Mon Nov 18 19:49:41 2013 +0100 Signed-off-by: Uli Schlachter <psychon@znc.in> Conflicts: - src/xcbint.h + src/xcbint.h commit c7c5b710f2cc0782412c9e159986c96b52aa0d02 Author: Mark Kettenis <kettenis@openbsd.org> @@ -3228,8 +3418,8 @@ Date: Tue Apr 12 13:09:23 2011 -0700 Conflicts: - src/xcb.h - src/xcb_in.c + src/xcb.h + src/xcb_in.c Signed-off-by: Jamey Sharp <jamey@minilop.net> @@ -3715,8 +3905,8 @@ Date: Tue Aug 31 18:33:36 2010 -0400 Merge branch 'master' of git://github.com/topcat/xcb-win32 Conflicts: - src/xcb_conn.c - src/xcb_util.c + src/xcb_conn.c + src/xcb_util.c Signed-off-by: Peter Harris <pharris@opentext.com> diff --git a/dist/libxcb/Makefile.am b/dist/libxcb/Makefile.am index 2475b6e60..57c3a7b8a 100644 --- a/dist/libxcb/Makefile.am +++ b/dist/libxcb/Makefile.am @@ -84,6 +84,9 @@ endif if BUILD_XVMC pkgconfig_DATA += xcb-xvmc.pc endif +if BUILD_GE +pkgconfig_DATA += xcb-ge.pc +endif AM_TESTS_ENVIRONMENT = \ diff --git a/dist/libxcb/NEWS b/dist/libxcb/NEWS index e1b46555a..c792b0559 100644 --- a/dist/libxcb/NEWS +++ b/dist/libxcb/NEWS @@ -1,3 +1,12 @@ +Release 1.13 (2018-02-28) +========================= +* Add support for variable-sized lists of FDs +* Poll for events when blocking waiting for special events +* xinput: Enable XInput extension by default +* ge: Add explicit support for GenericEvent extension +* Fix documentation warnings from clang +* Cosmetic cleanups + Release 1.12 (2016-05-18) ========================= * configure: Various fixes for dri3 and FD passing support diff --git a/dist/libxcb/build-aux/compile b/dist/libxcb/build-aux/compile index a85b723c7..2ab71e4ea 100644 --- a/dist/libxcb/build-aux/compile +++ b/dist/libxcb/build-aux/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -255,7 +255,8 @@ EOF echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -342,6 +343,6 @@ exit $ret # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/dist/libxcb/build-aux/test-driver b/dist/libxcb/build-aux/test-driver index 8e575b017..0218a01f6 100644 --- a/dist/libxcb/build-aux/test-driver +++ b/dist/libxcb/build-aux/test-driver @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2013-07-13.22; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2017 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -143,6 +143,6 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/dist/libxcb/compile b/dist/libxcb/compile deleted file mode 100644 index 531136b06..000000000 --- a/dist/libxcb/compile +++ /dev/null @@ -1,347 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand '-c -o'. - -scriptversion=2012-10-14.11; # UTC - -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# Written by Tom Tromey <tromey@cygnus.com>. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to <bug-automake@gnu.org> or send patches to -# <automake-patches@gnu.org>. - -nl=' -' - -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent tools from complaining about whitespace usage. -IFS=" "" $nl" - -file_conv= - -# func_file_conv build_file lazy -# Convert a $build file to $host form and store it in $file -# Currently only supports Windows hosts. If the determined conversion -# type is listed in (the comma separated) LAZY, no conversion will -# take place. -func_file_conv () -{ - file=$1 - case $file in - / | /[!/]*) # absolute file, and not a UNC file - if test -z "$file_conv"; then - # lazily determine how to convert abs files - case `uname -s` in - MINGW*) - file_conv=mingw - ;; - CYGWIN*) - file_conv=cygwin - ;; - *) - file_conv=wine - ;; - esac - fi - case $file_conv/,$2, in - *,$file_conv,*) - ;; - mingw/*) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; - cygwin/*) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine/*) - file=`winepath -w "$file" || echo "$file"` - ;; - esac - ;; - esac -} - -# func_cl_dashL linkdir -# Make cl look for libraries in LINKDIR -func_cl_dashL () -{ - func_file_conv "$1" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" -} - -# func_cl_dashl library -# Do a library search-path lookup for cl -func_cl_dashl () -{ - lib=$1 - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - lib=$dir/$lib.dll.lib - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - lib=$dir/$lib.lib - break - fi - if test -f "$dir/lib$lib.a"; then - found=yes - lib=$dir/lib$lib.a - break - fi - done - IFS=$save_IFS - - if test "$found" != yes; then - lib=$lib.lib - fi -} - -# func_cl_wrapper cl arg... -# Adjust compile command to suit cl -func_cl_wrapper () -{ - # Assume a capable shell - lib_path= - shared=: - linker_opts= - for arg - do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - eat=1 - case $2 in - *.o | *.[oO][bB][jJ]) - func_file_conv "$2" - set x "$@" -Fo"$file" - shift - ;; - *) - func_file_conv "$2" - set x "$@" -Fe"$file" - shift - ;; - esac - ;; - -I) - eat=1 - func_file_conv "$2" mingw - set x "$@" -I"$file" - shift - ;; - -I*) - func_file_conv "${1#-I}" mingw - set x "$@" -I"$file" - shift - ;; - -l) - eat=1 - func_cl_dashl "$2" - set x "$@" "$lib" - shift - ;; - -l*) - func_cl_dashl "${1#-l}" - set x "$@" "$lib" - shift - ;; - -L) - eat=1 - func_cl_dashL "$2" - ;; - -L*) - func_cl_dashL "${1#-L}" - ;; - -static) - shared=false - ;; - -Wl,*) - arg=${1#-Wl,} - save_ifs="$IFS"; IFS=',' - for flag in $arg; do - IFS="$save_ifs" - linker_opts="$linker_opts $flag" - done - IFS="$save_ifs" - ;; - -Xlinker) - eat=1 - linker_opts="$linker_opts $2" - ;; - -*) - set x "$@" "$1" - shift - ;; - *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) - func_file_conv "$1" - set x "$@" -Tp"$file" - shift - ;; - *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) - func_file_conv "$1" mingw - set x "$@" "$file" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift - done - if test -n "$linker_opts"; then - linker_opts="-link$linker_opts" - fi - exec "$@" $linker_opts - exit 1 -} - -eat= - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand '-c -o'. -Remove '-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file 'INSTALL'. - -Report bugs to <bug-automake@gnu.org>. -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) - func_cl_wrapper "$@" # Doesn't return... - ;; -esac - -ofile= -cfile= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - # So we strip '-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no '-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # '.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` - -# Create the lock directory. -# Note: use '[/\\:.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/dist/libxcb/configure.ac b/dist/libxcb/configure.ac index ec315420d..f880918bc 100644 --- a/dist/libxcb/configure.ac +++ b/dist/libxcb/configure.ac @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libxcb],[1.12], +AC_INIT([libxcb],[1.13], [https://bugs.freedesktop.org/enter_bug.cgi?product=xcb], [libxcb]) AC_CONFIG_AUX_DIR([build-aux]) @@ -50,7 +50,7 @@ fi AC_SUBST(HTML_CHECK_RESULT) # Checks for pkg-config packages -PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.12) +PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.13) NEEDED="pthread-stubs xau >= 0.99.2" PKG_CHECK_MODULES(NEEDED, $NEEDED) @@ -220,6 +220,7 @@ XCB_EXTENSION(Damage, yes) XCB_EXTENSION(DPMS, yes) XCB_EXTENSION(DRI2, yes) XCB_EXTENSION(DRI3, $have_sendmsg) +XCB_EXTENSION(GE, no) XCB_EXTENSION(GLX, yes) XCB_EXTENSION(Present, yes) XCB_EXTENSION(RandR, yes) @@ -234,7 +235,7 @@ XCB_EXTENSION(Xevie, no) XCB_EXTENSION(XFixes, yes) XCB_EXTENSION(XFree86-DRI, yes) XCB_EXTENSION(Xinerama, yes) -XCB_EXTENSION(XInput, no) +XCB_EXTENSION(XInput, yes) XCB_EXTENSION(XKB, yes) XCB_EXTENSION(Xprint, no) XCB_EXTENSION(SELinux, no) @@ -271,6 +272,7 @@ xcb-damage.pc xcb-dpms.pc xcb-dri2.pc xcb-dri3.pc +xcb-ge.pc xcb-glx.pc xcb-present.pc xcb-randr.pc @@ -318,6 +320,7 @@ echo " Damage..............: ${BUILD_DAMAGE}" echo " Dpms................: ${BUILD_DPMS}" echo " Dri2................: ${BUILD_DRI2}" echo " Dri3................: ${BUILD_DRI3}" +echo " GenericEvent........: ${BUILD_GE}" echo " Glx.................: ${BUILD_GLX}" echo " Randr...............: ${BUILD_RANDR}" echo " Record..............: ${BUILD_RECORD}" diff --git a/dist/libxcb/m4/libtool.m4 b/dist/libxcb/m4/libtool.m4 index 10ab2844c..a644432f4 100644 --- a/dist/libxcb/m4/libtool.m4 +++ b/dist/libxcb/m4/libtool.m4 @@ -2867,6 +2867,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -2875,7 +2878,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -2887,18 +2890,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -3558,7 +3549,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) +netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -4436,7 +4427,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4948,9 +4939,6 @@ m4_if([$1], [CXX], [ ;; esac ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -5013,9 +5001,6 @@ dnl Note also adjust exclude_expsyms for C++ above. openbsd* | bitrig*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -5270,7 +5255,7 @@ _LT_EOF fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -5791,7 +5776,6 @@ _LT_EOF if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi - _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -5813,7 +5797,7 @@ _LT_EOF esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else diff --git a/dist/libxcb/src/Makefile.am b/dist/libxcb/src/Makefile.am index e06e70bc9..17b64a80e 100644 --- a/dist/libxcb/src/Makefile.am +++ b/dist/libxcb/src/Makefile.am @@ -232,6 +232,13 @@ libxcb_xvmc_la_LIBADD = $(XCB_LIBS) nodist_libxcb_xvmc_la_SOURCES = xvmc.c xvmc.h endif +EXTSOURCES += ge.c +if BUILD_GE +lib_LTLIBRARIES += libxcb-ge.la +libxcb_ge_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@ +libxcb_ge_la_LIBADD = $(XCB_LIBS) +nodist_libxcb_ge_la_SOURCES = ge.c ge.h +endif EXTHEADERS=$(EXTSOURCES:.c=.h) xcbinclude_HEADERS = xcb.h xcbext.h diff --git a/dist/libxcb/src/c_client.py b/dist/libxcb/src/c_client.py index 57de3fb9d..2213a317d 100644 --- a/dist/libxcb/src/c_client.py +++ b/dist/libxcb/src/c_client.py @@ -437,7 +437,11 @@ def _c_type_setup(self, name, postfix): first_field_after_varsized = None for field in self.fields: - field.c_field_type = _t(field.field_type) + if field.type.is_event: + field.c_field_type = _t(field.field_type + ('event',)) + else: + field.c_field_type = _t(field.field_type) + field.c_field_const_type = ('' if field.type.nmemb == 1 else 'const ') + field.c_field_type field.c_field_name = _cpp(field.field_name) field.c_subscript = '[%d]' % field.type.nmemb if (field.type.nmemb and field.type.nmemb > 1) else '' @@ -454,7 +458,7 @@ def _c_type_setup(self, name, postfix): field.c_field_const_type = 'const ' + field.c_field_type self.c_need_aux = True - if not field.type.fixed_size() and not field.type.is_case_or_bitcase: + if not field.type.fixed_size() and not field.type.is_case_or_bitcase and field.wire: self.c_need_sizeof = True field.c_iterator_type = _t(field.field_type + ('iterator',)) # xcb_fieldtype_iterator_t @@ -493,7 +497,7 @@ def _c_type_setup(self, name, postfix): _c_type_setup(field.type, field.field_type, ()) if field.type.is_list: _c_type_setup(field.type.member, field.field_type, ()) - if (field.type.nmemb is None): + if (field.type.nmemb is None and field.wire): self.c_need_sizeof = True if self.c_need_serialize: @@ -1166,6 +1170,8 @@ def _c_serialize_helper_fields(context, self, _c_pre.push_indent(space + ' ') for field in self.fields: + if not field.wire: + continue if not field.visible: if not ((field.wire and not field.auto) or 'unserialize' == context): continue @@ -1190,7 +1196,9 @@ def _c_serialize_helper_fields(context, self, # fields with variable size else: - if field.type.is_pad: + if not field.wire: + continue + elif field.type.is_pad: # Variable length pad is <pad align= /> code_lines.append('%s xcb_align_to = %d;' % (space, field.type.align)) count += _c_serialize_helper_insert_padding(context, self, code_lines, space, @@ -1364,7 +1372,7 @@ def _c_serialize(context, self): _c(' unsigned int xcb_align_to = 0;') if self.is_switch: _c(' unsigned int xcb_padding_offset = %d;', - self.get_align_offset() ) + self.get_align_offset() ) prefix = [('_aux', '->', self)] aux_ptr = 'xcb_out' @@ -1390,7 +1398,7 @@ def _c_serialize(context, self): _c(' unsigned int xcb_align_to = 0;') if self.is_switch: _c(' unsigned int xcb_padding_offset = %d;', - self.get_align_offset() ) + self.get_align_offset() ) elif 'sizeof' == context: param_names = [p[2] for p in params] @@ -1661,14 +1669,7 @@ def _c_accessor_get_expr(expr, field_mapping): return c_name elif expr.op == 'sumof': # locate the referenced list object - field = None - for f in expr.lenfield_parent.fields: - if f.field_name == expr.lenfield_name: - field = f - break - - if field is None: - raise Exception("list field '%s' referenced by sumof not found" % expr.lenfield_name) + field = expr.lenfield list_name = field_mapping[field.c_field_name][0] c_length_func = "%s(%s)" % (field.c_length_name, list_name) c_length_func = _c_accessor_get_expr(field.type.expr, field_mapping) @@ -1930,14 +1931,14 @@ def _c_accessors_list(self, field): # from the request size and divide that by the member size return '(((R->length * 4) - sizeof('+ self.c_type + '))/'+'sizeof('+field.type.member.c_wiretype+'))' else: - # use the accessor to get the start of the list, then - # compute the length of it by subtracting it from + # use the accessor to get the start of the list, then + # compute the length of it by subtracting it from # the adress of the first byte after the end of the # request - after_end_of_request = '(((char*)R) + R->length * 4)' - start_of_list = '%s(R)' % (field.c_accessor_name) + after_end_of_request = '(((char*)R) + R->length * 4)' + start_of_list = '%s(R)' % (field.c_accessor_name) bytesize_of_list = '%s - (char*)(%s)' % (after_end_of_request, start_of_list) - return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype) + return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype) else: raise Exception( "lengthless lists with varsized members are not supported. Fieldname '%s'" @@ -2311,7 +2312,7 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False): count = 2 if not self.c_var_followed_by_fixed_fields: for field in param_fields: - if not field.type.fixed_size(): + if not field.type.fixed_size() and field.wire: count = count + 2 if field.type.c_need_serialize: # _serialize() keeps track of padding automatically @@ -2339,12 +2340,30 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False): if aux: _c(' void *xcb_aux%d = 0;' % (idx)) if list_with_var_size_elems: - _c(' unsigned int i;') _c(' unsigned int xcb_tmp_len;') _c(' char *xcb_tmp;') - num_fds = len([field for field in param_fields if field.isfd]) - if num_fds > 0: - _c(' int fds[%d];' % (num_fds)) + + num_fds_fixed = 0 + num_fds_expr = [] + for field in param_fields: + if field.isfd: + if not field.type.is_list: + num_fds_fixed += 1 + else: + num_fds_expr.append(_c_accessor_get_expr(field.type.expr, None)) + + if list_with_var_size_elems or len(num_fds_expr) > 0: + _c(' unsigned int i;') + + if num_fds_fixed > 0: + num_fds_expr.append('%d' % (num_fds_fixed)) + if len(num_fds_expr) > 0: + num_fds = '+'.join(num_fds_expr) + _c(' int fds[%s];' % (num_fds)) + _c(' int fd_index = 0;') + else: + num_fds = None + _c('') # fixed size fields @@ -2382,7 +2401,7 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False): count = 4 for field in param_fields: - if not field.type.fixed_size(): + if field.wire and not field.type.fixed_size(): _c(' /* %s %s */', field.type.c_type, field.c_field_name) # default: simple cast to char * if not field.type.c_need_serialize and not field.type.c_need_sizeof: @@ -2450,16 +2469,18 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False): # no padding necessary - _serialize() keeps track of padding automatically _c('') - fd_index = 0 for field in param_fields: if field.isfd: - _c(' fds[%d] = %s;', fd_index, field.c_field_name) - fd_index = fd_index + 1 + if not field.type.is_list: + _c(' fds[fd_index++] = %s;', field.c_field_name) + else: + _c(' for (i = 0; i < %s; i++)', _c_accessor_get_expr(field.type.expr, None)) + _c(' fds[fd_index++] = %s[i];', field.c_field_name) - if num_fds == 0: + if not num_fds: _c(' xcb_ret.sequence = xcb_send_request(c, %s, xcb_parts + 2, &xcb_req);', func_flags) else: - _c(' xcb_ret.sequence = xcb_send_request_with_fds(c, %s, xcb_parts + 2, &xcb_req, %d, fds);', func_flags, num_fds) + _c(' xcb_ret.sequence = xcb_send_request_with_fds(c, %s, xcb_parts + 2, &xcb_req, %s, fds);', func_flags, num_fds) # free dyn. all. data, if any for f in free_calls: @@ -3163,6 +3184,28 @@ def c_request(self, name): # TODO: what about aux helpers? _man_request(self, name, void=not self.reply, aux=False) + +def c_eventstruct(self, name): + #add fields that are needed to get the event-type in a generic way + self.fields.append( Field( tevent, tevent.name, 'event_header', False, True, True) ) + + if self.contains_ge_events: + #TODO: add header of ge-events as an extra field + raise Exception( 'eventstructs with ge-events are not yet supported' ) + + _c_type_setup(self, name, ()) + + #correct the format of the field names + for field in self.fields: + field.c_field_name = _n_item(field.c_field_name).lower() + + _c_complex(self) + _c_iterator(self, name) + + if not self.fixed_size(): + #TODO: Create sizeof function (and maybe other accessors) for var-sized eventstructs + raise Exception( 'var sized eventstructs are not yet supported' ) + def c_event(self, name): ''' Exported function that handles event declarations. @@ -3260,6 +3303,7 @@ output = {'open' : c_open, 'struct' : c_struct, 'union' : c_union, 'request' : c_request, + 'eventstruct' : c_eventstruct, 'event' : c_event, 'error' : c_error, } @@ -3303,6 +3347,9 @@ Refer to the README file in xcb/proto for more info. ''') raise +# predefined datatype globals. +tevent = SimpleType(('xcb_raw_generic_event_t',), 32) + # Ensure the man subdirectory exists try: os.mkdir('man') diff --git a/dist/libxcb/src/xcb.h b/dist/libxcb/src/xcb.h index 86eb1bcee..cbc0f2bf2 100644 --- a/dist/libxcb/src/xcb.h +++ b/dist/libxcb/src/xcb.h @@ -143,6 +143,18 @@ typedef struct { } xcb_generic_event_t; /** + * @brief Raw Generic event. + * + * A generic event structure as used on the wire, i.e., without the full_sequence field + */ +typedef struct { + uint8_t response_type; /**< Type of the response */ + uint8_t pad0; /**< Padding */ + uint16_t sequence; /**< Sequence number */ + uint32_t pad[7]; /**< Padding */ +} xcb_raw_generic_event_t; + +/** * @brief GE event * * An event as sent by the XGE extension. The length field specifies the @@ -225,7 +237,7 @@ typedef struct xcb_auth_info_t { /** * @brief Forces any buffered output to be written to the server. - * @param c: The connection to the X server. + * @param c The connection to the X server. * @return > @c 0 on success, <= @c 0 otherwise. * * Forces any buffered output to be written to the server. Blocks @@ -235,7 +247,7 @@ int xcb_flush(xcb_connection_t *c); /** * @brief Returns the maximum request length that this server accepts. - * @param c: The connection to the X server. + * @param c The connection to the X server. * @return The maximum request length field. * * In the absence of the BIG-REQUESTS extension, returns the @@ -252,7 +264,7 @@ uint32_t xcb_get_maximum_request_length(xcb_connection_t *c); /** * @brief Prefetch the maximum request length without blocking. - * @param c: The connection to the X server. + * @param c The connection to the X server. * * Without blocking, does as much work as possible toward computing * the maximum request length accepted by the X server. @@ -274,7 +286,7 @@ void xcb_prefetch_maximum_request_length(xcb_connection_t *c); /** * @brief Returns the next event or error from the server. - * @param c: The connection to the X server. + * @param c The connection to the X server. * @return The next event from the server. * * Returns the next event or error from the server, or returns null in @@ -285,7 +297,7 @@ xcb_generic_event_t *xcb_wait_for_event(xcb_connection_t *c); /** * @brief Returns the next event or error from the server. - * @param c: The connection to the X server. + * @param c The connection to the X server. * @return The next event from the server. * * Returns the next event or error from the server, if one is @@ -298,7 +310,7 @@ xcb_generic_event_t *xcb_poll_for_event(xcb_connection_t *c); /** * @brief Returns the next event without reading from the connection. - * @param c: The connection to the X server. + * @param c The connection to the X server. * @return The next already queued event from the server. * * This is a version of xcb_poll_for_event that only examines the @@ -346,8 +358,8 @@ void xcb_unregister_for_special_event(xcb_connection_t *c, /** * @brief Return the error for a request, or NULL if none can ever arrive. - * @param c: The connection to the X server. - * @param cookie: The request cookie. + * @param c The connection to the X server. + * @param cookie The request cookie. * @return The error for the request, or NULL if none can ever arrive. * * The xcb_void_cookie_t cookie supplied to this function must have resulted @@ -364,8 +376,8 @@ xcb_generic_error_t *xcb_request_check(xcb_connection_t *c, xcb_void_cookie_t co /** * @brief Discards the reply for a request. - * @param c: The connection to the X server. - * @param sequence: The request sequence number from a cookie. + * @param c The connection to the X server. + * @param sequence The request sequence number from a cookie. * * Discards the reply for a request. Additionally, any error generated * by the request is also discarded (unless it was an _unchecked request @@ -380,8 +392,8 @@ void xcb_discard_reply(xcb_connection_t *c, unsigned int sequence); /** * @brief Discards the reply for a request, given by a 64bit sequence number - * @param c: The connection to the X server. - * @param sequence: 64-bit sequence number as returned by xcb_send_request64(). + * @param c The connection to the X server. + * @param sequence 64-bit sequence number as returned by xcb_send_request64(). * * Discards the reply for a request. Additionally, any error generated * by the request is also discarded (unless it was an _unchecked request @@ -403,8 +415,8 @@ void xcb_discard_reply64(xcb_connection_t *c, uint64_t sequence); /** * @brief Caches reply information from QueryExtension requests. - * @param c: The connection. - * @param ext: The extension data. + * @param c The connection. + * @param ext The extension data. * @return A pointer to the xcb_query_extension_reply_t for the extension. * * This function is the primary interface to the "extension cache", @@ -421,8 +433,8 @@ const struct xcb_query_extension_reply_t *xcb_get_extension_data(xcb_connection_ /** * @brief Prefetch of extension data into the extension cache - * @param c: The connection. - * @param ext: The extension data. + * @param c The connection. + * @param ext The extension data. * * This function allows a "prefetch" of extension data into the * extension cache. Invoking the function may cause a call to @@ -437,7 +449,7 @@ void xcb_prefetch_extension_data(xcb_connection_t *c, xcb_extension_t *ext); /** * @brief Access the data returned by the server. - * @param c: The connection. + * @param c The connection. * @return A pointer to an xcb_setup_t structure. * * Accessor for the data returned by the server when the xcb_connection_t @@ -457,7 +469,7 @@ const struct xcb_setup_t *xcb_get_setup(xcb_connection_t *c); /** * @brief Access the file descriptor of the connection. - * @param c: The connection. + * @param c The connection. * @return The file descriptor. * * Accessor for the file descriptor that was passed to the @@ -467,7 +479,7 @@ int xcb_get_file_descriptor(xcb_connection_t *c); /** * @brief Test whether the connection has shut down due to a fatal error. - * @param c: The connection. + * @param c The connection. * @return > 0 if the connection is in an error state; 0 otherwise. * * Some errors that occur in the context of an xcb_connection_t @@ -487,8 +499,8 @@ int xcb_connection_has_error(xcb_connection_t *c); /** * @brief Connects to the X server. - * @param fd: The file descriptor. - * @param auth_info: Authentication data. + * @param fd The file descriptor. + * @param auth_info Authentication data. * @return A newly allocated xcb_connection_t structure. * * Connects to an X server, given the open socket @p fd and the @@ -506,7 +518,7 @@ xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info); /** * @brief Closes the connection. - * @param c: The connection. + * @param c The connection. * * Closes the file descriptor and frees all memory associated with the * connection @c c. If @p c is @c NULL, nothing is done. @@ -518,10 +530,10 @@ void xcb_disconnect(xcb_connection_t *c); /** * @brief Parses a display string name in the form documented by X(7x). - * @param name: The name of the display. - * @param host: A pointer to a malloc'd copy of the hostname. - * @param display: A pointer to the display number. - * @param screen: A pointer to the screen number. + * @param name The name of the display. + * @param host A pointer to a malloc'd copy of the hostname. + * @param display A pointer to the display number. + * @param screen A pointer to the screen number. * @return 0 on failure, non 0 otherwise. * * Parses the display string name @p display_name in the form @@ -537,8 +549,8 @@ int xcb_parse_display(const char *name, char **host, int *display, int *screen); /** * @brief Connects to the X server. - * @param displayname: The name of the display. - * @param screenp: A pointer to a preferred screen number. + * @param displayname The name of the display. + * @param screenp A pointer to a preferred screen number. * @return A newly allocated xcb_connection_t structure. * * Connects to the X server specified by @p displayname. If @p @@ -556,9 +568,9 @@ xcb_connection_t *xcb_connect(const char *displayname, int *screenp); /** * @brief Connects to the X server, using an authorization information. - * @param display: The name of the display. - * @param auth: The authorization information. - * @param screen: A pointer to a preferred screen number. + * @param display The name of the display. + * @param auth The authorization information. + * @param screen A pointer to a preferred screen number. * @return A newly allocated xcb_connection_t structure. * * Connects to the X server specified by @p displayname, using the @@ -578,7 +590,7 @@ xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *display, xcb /** * @brief Allocates an XID for a new object. - * @param c: The connection. + * @param c The connection. * @return A newly allocated XID. * * Allocates an XID for a new object. Typically used just prior to diff --git a/dist/libxcb/src/xcb_in.c b/dist/libxcb/src/xcb_in.c index bab4bc77f..73209e0c4 100644 --- a/dist/libxcb/src/xcb_in.c +++ b/dist/libxcb/src/xcb_in.c @@ -661,6 +661,8 @@ int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, assert(reply != 0); pthread_mutex_lock(&c->iolock); ret = poll_for_reply(c, widen(c, request), reply, error); + if(!ret && c->in.reading == 0 && _xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */ + ret = poll_for_reply(c, widen(c, request), reply, error); pthread_mutex_unlock(&c->iolock); return ret; } @@ -678,6 +680,8 @@ int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xc assert(reply != 0); pthread_mutex_lock(&c->iolock); ret = poll_for_reply(c, request, reply, error); + if(!ret && c->in.reading == 0 && _xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */ + ret = poll_for_reply(c, request, reply, error); pthread_mutex_unlock(&c->iolock); return ret; } @@ -768,6 +772,8 @@ xcb_generic_event_t *xcb_poll_for_special_event(xcb_connection_t *c, return 0; pthread_mutex_lock(&c->iolock); event = get_special_event(c, se); + if(!event && c->in.reading == 0 && _xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */ + event = get_special_event(c, se); pthread_mutex_unlock(&c->iolock); return event; } diff --git a/dist/libxcb/src/xcb_util.c b/dist/libxcb/src/xcb_util.c index a3357efde..a16270c63 100644 --- a/dist/libxcb/src/xcb_util.c +++ b/dist/libxcb/src/xcb_util.c @@ -265,6 +265,8 @@ static int _xcb_open(const char *host, char *protocol, const int display) struct stat sbuf; if (0 == stat(host, &sbuf)) { file = strdup(host); + if(file == NULL) + return -1; filelen = actual_filelen = strlen(file); } else #endif diff --git a/dist/libxcb/src/xcbext.h b/dist/libxcb/src/xcbext.h index 44d789eee..90f9d58b8 100644 --- a/dist/libxcb/src/xcbext.h +++ b/dist/libxcb/src/xcbext.h @@ -60,10 +60,10 @@ enum xcb_send_request_flags_t { /** * @brief Send a request to the server. - * @param c: The connection to the X server. - * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration. - * @param vector: Data to send; must have two iovecs before start for internal use. - * @param request: Information about the request to be sent. + * @param c The connection to the X server. + * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. + * @param vector Data to send; must have two iovecs before start for internal use. + * @param request Information about the request to be sent. * @return The request's sequence number on success, 0 otherwise. * * This function sends a new request to the X server. The data of the request is @@ -84,12 +84,12 @@ unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vect /** * @brief Send a request to the server. - * @param c: The connection to the X server. - * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration. - * @param vector: Data to send; must have two iovecs before start for internal use. - * @param request: Information about the request to be sent. - * @param num_fds: Number of additional file descriptors to send to the server - * @param fds: Additional file descriptors that should be send to the server. + * @param c The connection to the X server. + * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. + * @param vector Data to send; must have two iovecs before start for internal use. + * @param request Information about the request to be sent. + * @param num_fds Number of additional file descriptors to send to the server + * @param fds Additional file descriptors that should be send to the server. * @return The request's sequence number on success, 0 otherwise. * * This function sends a new request to the X server. The data of the request is @@ -115,10 +115,10 @@ unsigned int xcb_send_request_with_fds(xcb_connection_t *c, int flags, struct io /** * @brief Send a request to the server, with 64-bit sequence number returned. - * @param c: The connection to the X server. - * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration. - * @param vector: Data to send; must have two iovecs before start for internal use. - * @param request: Information about the request to be sent. + * @param c The connection to the X server. + * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. + * @param vector Data to send; must have two iovecs before start for internal use. + * @param request Information about the request to be sent. * @return The request's sequence number on success, 0 otherwise. * * This function sends a new request to the X server. The data of the request is @@ -139,12 +139,12 @@ uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector /** * @brief Send a request to the server, with 64-bit sequence number returned. - * @param c: The connection to the X server. - * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration. - * @param vector: Data to send; must have two iovecs before start for internal use. - * @param request: Information about the request to be sent. - * @param num_fds: Number of additional file descriptors to send to the server - * @param fds: Additional file descriptors that should be send to the server. + * @param c The connection to the X server. + * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. + * @param vector Data to send; must have two iovecs before start for internal use. + * @param request Information about the request to be sent. + * @param num_fds Number of additional file descriptors to send to the server + * @param fds Additional file descriptors that should be send to the server. * @return The request's sequence number on success, 0 otherwise. * * This function sends a new request to the X server. The data of the request is @@ -171,8 +171,8 @@ uint64_t xcb_send_request_with_fds64(xcb_connection_t *c, int flags, struct iove /** * @brief Send a file descriptor to the server in the next call to xcb_send_request. - * @param c: The connection to the X server. - * @param fd: The file descriptor to send. + * @param c The connection to the X server. + * @param fd The file descriptor to send. * * After this function returns, the file descriptor given is owned by xcb and * will be closed eventually. @@ -185,12 +185,12 @@ void xcb_send_fd(xcb_connection_t *c, int fd); /** * @brief Take over the write side of the socket - * @param c: The connection to the X server. - * @param return_socket: Callback function that will be called when xcb wants + * @param c The connection to the X server. + * @param return_socket Callback function that will be called when xcb wants * to use the socket again. - * @param closure: Argument to the callback function. - * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration. - * @param sent: Location to the sequence number of the last sequence request. + * @param closure Argument to the callback function. + * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. + * @param sent Location to the sequence number of the last sequence request. * Must not be NULL. * @return 1 on success, else 0. * @@ -214,10 +214,10 @@ int xcb_take_socket(xcb_connection_t *c, void (*return_socket)(void *closure), v /** * @brief Send raw data to the X server. - * @param c: The connection to the X server. - * @param vector: Array of data to be sent. - * @param count: Number of entries in @p vector. - * @param requests: Number of requests that are being sent. + * @param c The connection to the X server. + * @param vector Array of data to be sent. + * @param count Number of entries in @p vector. + * @param requests Number of requests that are being sent. * @return 1 on success, else 0. * * You must own the write-side of the socket (you've called @@ -238,9 +238,9 @@ int xcb_writev(xcb_connection_t *c, struct iovec *vector, int count, uint64_t re /** * @brief Wait for the reply of a given request. - * @param c: The connection to the X server. - * @param request: Sequence number of the request as returned by xcb_send_request(). - * @param e: Location to store errors in, or NULL. Ignored for unchecked requests. + * @param c The connection to the X server. + * @param request Sequence number of the request as returned by xcb_send_request(). + * @param e Location to store errors in, or NULL. Ignored for unchecked requests. * * Returns the reply to the given request or returns null in the event of * errors. Blocks until the reply or error for the request arrives, or an I/O @@ -250,9 +250,9 @@ void *xcb_wait_for_reply(xcb_connection_t *c, unsigned int request, xcb_generic_ /** * @brief Wait for the reply of a given request, with 64-bit sequence number - * @param c: The connection to the X server. - * @param request: 64-bit sequence number of the request as returned by xcb_send_request64(). - * @param e: Location to store errors in, or NULL. Ignored for unchecked requests. + * @param c The connection to the X server. + * @param request 64-bit sequence number of the request as returned by xcb_send_request64(). + * @param e Location to store errors in, or NULL. Ignored for unchecked requests. * * Returns the reply to the given request or returns null in the event of * errors. Blocks until the reply or error for the request arrives, or an I/O @@ -265,10 +265,10 @@ void *xcb_wait_for_reply64(xcb_connection_t *c, uint64_t request, xcb_generic_er /** * @brief Poll for the reply of a given request. - * @param c: The connection to the X server. - * @param request: Sequence number of the request as returned by xcb_send_request(). - * @param reply: Location to store the reply in, must not be NULL. - * @param e: Location to store errors in, or NULL. Ignored for unchecked requests. + * @param c The connection to the X server. + * @param request Sequence number of the request as returned by xcb_send_request(). + * @param reply Location to store the reply in, must not be NULL. + * @param error Location to store errors in, or NULL. Ignored for unchecked requests. * @return 1 when the reply to the request was returned, else 0. * * Checks if the reply to the given request already received. Does not block. @@ -277,10 +277,10 @@ int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, /** * @brief Poll for the reply of a given request, with 64-bit sequence number. - * @param c: The connection to the X server. - * @param request: 64-bit sequence number of the request as returned by xcb_send_request(). - * @param reply: Location to store the reply in, must not be NULL. - * @param e: Location to store errors in, or NULL. Ignored for unchecked requests. + * @param c The connection to the X server. + * @param request 64-bit sequence number of the request as returned by xcb_send_request(). + * @param reply Location to store the reply in, must not be NULL. + * @param error Location to store errors in, or NULL. Ignored for unchecked requests. * @return 1 when the reply to the request was returned, else 0. * * Checks if the reply to the given request already received. Does not block. @@ -292,9 +292,9 @@ int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xc /** * @brief Don't use this, only needed by the generated code. - * @param c: The connection to the X server. - * @param reply: A reply that was received from the server - * @param replylen: The size of the reply. + * @param c The connection to the X server. + * @param reply A reply that was received from the server + * @param replylen The size of the reply. * @return Pointer to the location where received file descriptors are stored. */ int *xcb_get_reply_fds(xcb_connection_t *c, void *reply, size_t replylen); @@ -303,14 +303,14 @@ int *xcb_get_reply_fds(xcb_connection_t *c, void *reply, size_t replylen); /* xcb_util.c */ /** - * @param mask: The mask to check + * @param mask The mask to check * @return The number of set bits in the mask */ int xcb_popcount(uint32_t mask); /** - * @param list: The base of an array - * @param len: The length of the array + * @param list The base of an array + * @param len The length of the array * @return The sum of all entries in the array. */ int xcb_sumof(uint8_t *list, int len); diff --git a/dist/libxcb/xcb-ge.pc.in b/dist/libxcb/xcb-ge.pc.in new file mode 100644 index 000000000..b5f380d8c --- /dev/null +++ b/dist/libxcb/xcb-ge.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: XCB GenericEvent +Description: XCB GenericEvent Extension +Version: @PACKAGE_VERSION@ +Requires.private: xcb +Libs: -L${libdir} -lxcb-ge +Cflags: -I${includedir} |