C interface to the X Window System protocol, which replaces the traditional Xlib interface.
Go to file
Christian Linhart a7c75be5b1 generator: fix align-pads for switches which start at unaligned pos
Fix the alignment computation inside switches which start at
an unaligned pos.
This affects both explicit and implicit align pads.

The alignment offset is derived from the lowest 3 bits of
the pointer to the protocol-data at the start of the switch.
This is sufficient for correcting all alignments up to 8-byte alignment.
As far as I know there is no bigger alignment than 8-byte for the
X-protocol.

Example:
struct InputState, where the switch starts after two 1-byte fields,
which is a 2 byte offset for 4-byte and 8-byte alignment.

The previous problem can be demonstrated when adding a
<pad align="4"/> at the end of case "key".

(Or when finding a testcase which reports the case "valuator" not
at the last position of the QueryDeviceState-reply.
I didn't find such a testcase, so I have used the pad align
as described above.)

V2: patch modified in order to fix bugs which I found when working on the
next issue:
* xcb_padding_offset has to be set 0 when xcb_block_len is set 0
* xcb_padding_offset cannot be "const" therefore
* for unpack and unserialize, the padding_offset must computed
  from _buffer instead of from the aux_var.

V3: patch revised according to suggestion by Ran Benita:
* only create and use xcb_padding_offset for switch

Message-ID: <1410298000-24734-1-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] xinput:QueryDeviceState: full-support: generator and xml-changes
Patch-Set: QueryDeviceState
Patch-Number: libxcb 4/4
Patch-Version: V3
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
2014-10-20 12:21:21 +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 man: build static man pages using xorg patterns 2014-01-30 12:10:00 +09:00
src generator: fix align-pads for switches which start at unaligned pos 2014-10-20 12:21:21 +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 Add ChangeLog and INSTALL using xorg macros 2014-08-06 13:29:16 +02:00
NEWS Release libxcb 1.11 2014-08-01 16:04:34 +02: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 Validate .pc file Requires lines 2014-03-22 14:44:52 +01:00
configure.ac Disable Xevie and Xprint by default 2014-08-06 13:32:50 +02:00
xcb-composite.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-damage.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-dpms.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-dri2.pc.in Add DRI2 support. (v2) 2009-10-19 09:47:06 -07:00
xcb-dri3.pc.in Add DRI3 library 2013-11-07 14:02:37 -08:00
xcb-glx.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-present.pc.in Update .pc file Requires lines to express full dependencies 2014-03-22 14:44:52 +01:00
xcb-randr.pc.in Update .pc file Requires lines to express full dependencies 2014-03-22 14:44:52 +01:00
xcb-record.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-render.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-res.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-screensaver.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-shape.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-shm.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-sync.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xevie.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xf86dri.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xfixes.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xinerama.pc.in Use substitition variables in xcb-xinerama.pc.in, not instances of their values 2006-11-25 22:27:33 -08:00
xcb-xinput.pc.in Update .pc file Requires lines to express full dependencies 2014-03-22 14:44:52 +01:00
xcb-xkb.pc.in small fix in the xkb pkg file 2010-08-16 18:22:42 +02:00
xcb-xprint.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xselinux.pc.in Add SELinux extension support, disabled by default. 2008-01-24 16:02:34 -05:00
xcb-xtest.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xv.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07:00
xcb-xvmc.pc.in Lowercase library names to correspond with the new API. 2006-09-25 01:42:12 -07: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