Replies are always 32 bytes, so many messages have padding at the end of them.
The XCB code doesn't have a problem with the missing padding fields, but they
are nice to have so they match the spec and other users of this data don't have
to check message lengths.
Two cases had padding but with shorter amounts than required.
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xcbproto/-/merge_requests/60>
Performed with: git ls-files | xargs perl -i -p -e 's{[ \t]+$}{}'
git diff -w & git diff -b show no diffs from this change
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Instead of using "Left Double Quotation Mark", this replaces some
documentation comments with normal, ASCII-compatible quotation marks.
Related-to: https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues/72
Signed-off-by: Uli Schlachter <psychon@znc.in>
Otherwise it's hard to tell where this came from, and we qualify most
everything else in this file anyway.
Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
This is useful, but it crashes the XCB code generator.
xorg/lib/libxcb!38 prevents the crash.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
fall-outs, when they contain space.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Syncs the invocation of configure with the one from the server.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
configure.ac:22: warning: AC_OUTPUT should be used without arguments.
configure.ac:22: You should run autoupdate.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Added by 17ab095 ("add libdir/exec_prefix to xcb-xproto.pc") with the
rationale of using it to find the python path, but later commits bd7a481
("pkg-config: Add sysroot prefix") and be9c255 ("Adjust to automake
1.16.4 changes") make this directly accessible.
By removing libdir from the pkgconfig file, the file becomes identical
for different ABIs.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Adjacent lists of char should not have any automatic padding added,
since the alignment requirements for both are the same. Add explicit
padding where it is required.
Signed-off-by: Peter Harris <pharris@opentext.com>
This makes the code added in the previous commit consistent with the
rest of the code base. From Björn's suggestion:
This should import xml.etree.{,c}ElementTree conditionally on the
version of the Python interpreter used to import this module.
xml.etree.ElementTree is preferred for Python >= 3.3, as it uses the
fastest possible implementation automatically. Earlier versions of
Python need xml.etree.cElementTree as they may not have an
implementation that can be used in a platform generic way.
Suggested-by: Björn Esser <besser82@fedoraproject.org>
All X11 errors have the same fields. There are no differences.
In a perfect world, the XML could thus just say "define an error" and
xcbgen would do all the rest. However, the world is imperfect and we
already have a mixture of fields defined in the XML. Some of the XML
even defines trailing padding, while most does not.
This commit makes xcbgen add all fields to X11 errors, but those that
are already defined in the XML are skipped and left as-is. Due to the
structure of the code, this requires pretending that a different XML was
read, i.e. the code now modifies the in-memory structure of ElementTree
to add the missing fields to the in-memory representation of the XML.
This is the simplest way that I found to append elements. The existing
mechanisms can only prepend fields.
The approach taken by this commit was suggested by Peter Harris. Thanks
a lot for this idea, it's a lot simpler than my previous approach.
Fixes: https://gitlab.freedesktop.org/xorg/proto/xcbproto/-/issues/16
Signed-off-by: Uli Schlachter <psychon@znc.in>
Currently the layout of a struct is used to compute its size. This works
fine in case of structs of fixed size. However this introduces
forwards-compatibility problems in cases when the struct has multiple
variants and the exact variant is specified by the value of some field
(e.g. in the case of <switch> elements). Future revisions of protocols
may introduce new layout variants, in which case the old code does not
know the size of the struct variant and can't parse the incoming byte
stream.
Instead of relying on knowledge about the layout of data structures we
should instead use the length field for length information. This way
when old client libxcb communicates with newer server it can at least
ignore unknown struct variants.
The Xserver itself is capable of terminating itself once all X11 clients
are gone, yet in a typical full session, there are a number of X11
clients running continuously (e.g. the Xsettings daemon, IBus, etc.).
Those always-running clients will prevent the Xserver from terminating,
because the actual number of X11 clients will never drop to 0.
To solve this issue directly at the Xserver level, this add new entries
to the XFixes extension to let the X11 clients themselves specify the
disconnect mode they expect.
Typically, those X11 daemon clients would specify the disconnect mode
XFixesClientDisconnectFlagTerminate to let the Xserver know that they
should not be accounted for when checking the remaining clients prior
to terminate.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Simon Ser <contact@emersion.fr>