xorg-libxcb/src
Uli Schlachter aa02096b8e Compute alignment correctly
The code previously assumed that everything has to be aligned to a 4 byte
boundary. This assumption is wrong as e.g. the STR struct from xproto shows.

Instead, each type has to be aligned to its natural alignment. So a char doesn't
need any alignment, a INT16 gets aligned to a 2-byte-boundary and a INT32 gets
the old 4 byte alignment.

I'm not 100% sure that this commit is correct, but some quick tests with awesome
and cairo-xcb went well.

This commit causes lots of dead assignments to xcb_align_to since only the last
field's alignment is actually used, but this simplified this patch a lot.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=34037

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Peter Harris <pharris@opentext.com>
2011-08-24 10:28:49 -04:00
..
.gitignore Add xkb.* to gitignore 2010-09-10 15:54:56 -04:00
c_client.py Compute alignment correctly 2011-08-24 10:28:49 -04:00
Makefile.am fix Windows build and installation 2011-01-20 20:46:04 -05:00
xcb.h Revert "Introduce xcb_wait_for_event_until, for consuming responses in wire-order." 2011-04-12 13:11:48 -07:00
xcb_auth.c Prevent theoretical double free and leak on get_peer_sock_name. 2011-03-24 11:30:21 -04:00
xcb_conn.c Add #include <sys/socket.h> to xcb_conn.c 2011-04-04 22:06:16 -07:00
xcb_ext.c Rename index to idx to avoid shadowing 2008-08-28 13:49:21 +02:00
xcb_in.c Revert "Introduce xcb_wait_for_event_until, for consuming responses in wire-order." 2011-04-12 13:11:48 -07:00
xcb_list.c The Great XCB Renaming 2006-09-23 12:22:22 -07:00
xcb_out.c xcb_request_check: Hold the I/O lock while deciding to sync. 2010-10-09 12:37:48 -07:00
xcb_util.c Drop AI_ADDRCONFIG when resolving TCP addresses 2011-08-18 13:39:56 -07:00
xcb_windefs.h changes in xcb_windefs.h - the flag _XCB_WINDEFS_H replaces WINDEFS_H 2010-03-29 22:37:33 +05:30
xcb_xid.c kludgily hand-merged xid fixes 2009-03-28 14:59:01 +01:00
xcbext.h Merge branch 'master' of git://anongit.freedesktop.org/~peterh/libxcb 2010-12-23 13:04:40 -05:00
xcbint.h Revert "Introduce xcb_wait_for_event_until, for consuming responses in wire-order." 2011-04-12 13:11:48 -07:00