C interface to the X Window System protocol, which replaces the traditional Xlib interface.
Go to file
Erik Kurzinger bbda345a71 don't flag extra reply in xcb_take_socket
If any flags are specified in a call to xcb_take_socket,
they should only be applied to replies for requests sent
after that function returns (and until the socket is
re-acquired by XCB).

Previously, they would also be incorrectly applied to the
reply for the last request sent before the socket was taken.
For instance, in this example program the reply for the
GetInputFocus request gets discarded, even though it was
sent before the socket was taken. This results in the
call to retrieve the reply hanging indefinitely.

static void return_socket(void *closure) {}

int main(void)
{
    Display *dpy = XOpenDisplay(NULL);
    xcb_connection_t *c = XGetXCBConnection(dpy);

    xcb_get_input_focus_cookie_t cookie = xcb_get_input_focus_unchecked(c);
    xcb_flush(c);

    uint64_t seq;
    xcb_take_socket(c, return_socket, dpy, XCB_REQUEST_DISCARD_REPLY, &seq);

    xcb_generic_error_t *err;
    xcb_get_input_focus_reply(c, cookie, &err);
}

In practice, this has been causing intermittent KWin crashes when
used in combination with the proprietary NVIDIA driver such as
https://bugs.kde.org/show_bug.cgi?id=386370 since when Xlib fails to
retrieve one of these incorrectly discarded replies it triggers
an IO error.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-08-21 18:57:01 +02:00
doc Fix typos & awkward wording in tutorial 2014-07-11 20:41:15 -07:00
m4 config: issue an error if DRI3 is requested, but sendfds is not available 2014-08-06 13:26:08 +02:00
man Escape \n to display properly in xcb-requests man page 2015-04-29 23:23:05 -07:00
src don't flag extra reply in xcb_take_socket 2018-08-21 18:57:01 +02:00
tests tests: Add files to .gitignore 2013-08-15 00:35:08 +02:00
tools Match only XCB-namespaced XID generators when converting to xcb_generate_id. 2006-10-15 12:34:30 -07:00
.autom4te.cfg Use build-aux as autom4te cache directory 2013-08-15 00:35:07 +02:00
.gitignore Add ChangeLog and INSTALL using xorg macros 2014-08-06 13:29:16 +02:00
COPYING Fix the year in COPYING. 2006-04-27 17:32:20 -07:00
Makefile.am optionally build the GE extension 2017-03-11 10:51:33 +01:00
NEWS Release libxcb 1.13 2018-02-28 17:24:53 +00:00
README Release libxcb 1.1 2007-11-04 17:29:13 -08:00
autogen.sh autogen.sh: Implement GNOME Build API 2013-01-16 13:20:49 -05:00
check-pc-requires Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
configure.ac Release libxcb 1.13 2018-02-28 17:24:53 +00:00
xcb-composite.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-damage.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-dpms.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-dri2.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-dri3.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-ge.pc.in optionally build the GE extension 2017-03-11 10:51:33 +01:00
xcb-glx.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-present.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-randr.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-record.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-render.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-res.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-screensaver.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-shape.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-shm.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-sync.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xevie.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xf86dri.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xfixes.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xinerama.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xinput.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xkb.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xprint.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xselinux.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xtest.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xv.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb-xvmc.pc.in Move internal/private dependencies to Requires.private 2014-10-03 23:53:54 +02:00
xcb.pc.in Store xcbproto version libxcb was compiled with 2009-05-25 12:20:23 +02:00

About libxcb
============

libxcb provides an interface to the X Window System protocol, which
replaces the current Xlib interface. It has several advantages over
Xlib, including:
- size: small, simple library, and lower memory footprint
- latency hiding: batch several requests and wait for the replies later
- direct protocol access: interface and protocol correspond exactly
- proven thread support: transparently access XCB from multiple threads
- easy extension implementation: interfaces auto-generated from XML-XCB

Xlib can also use XCB as a transport layer, allowing software to make
requests and receive responses with both, which eases porting to XCB.
However, client programs, libraries, and toolkits will gain the most
benefit from a native XCB port.


Please report any issues you find to the freedesktop.org bug tracker,
at:

	<https://bugs.freedesktop.org/enter_bug.cgi?product=XCB>

Discussion about XCB occurs on the XCB mailing list:

        <mailto:xcb at lists.freedesktop.org>
        <http://lists.freedesktop.org/mailman/listinfo/xcb>

You can obtain the latest development versions of XCB using GIT.
For anonymous checkouts, use:

        git clone git://anongit.freedesktop.org/git/xcb/libxcb

For developers, use:

        git clone git+ssh://git.freedesktop.org/git/xcb/libxcb