Commit graph

537 commits

Author SHA1 Message Date
Matt Turner
77d7fc04da xcb-proto 1.17.0
Signed-off-by: Matt Turner <mattst88@gmail.com>
2024-04-12 12:40:38 -04:00
Erik Kurzinger
c9482ce62b Add PresentPixmapSynced and PresentCapabilitySyncobj
Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
2024-04-12 07:39:57 -07:00
Erik Kurzinger
c6967a67d7 Add DRI3ImportSyncobj and DRI3FreeSyncobj
Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
2024-01-28 10:01:20 -08:00
Uli Schlachter
1388374c71 Fix typo in "heirarchy"
heirarchy -> hierarchy

Signed-off-by: Uli Schlachter <psychon@znc.in>
2023-09-17 12:41:28 +02:00
Uli Schlachter
ec97274725 Use simply quote signs
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>
2023-09-17 12:40:03 +02:00
Matt Turner
98eeebfc2d xcb-proto 1.16.0
Signed-off-by: Matt Turner <mattst88@gmail.com>
2023-08-16 16:06:46 -04:00
Alexander Volkov
b016df1001 dpms: Add DPMSInfoNotify event (DPMS 1.2)
Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
2023-07-19 15:48:20 +00:00
Xaver Hugl
91178913c2 add PresentOptionAsyncMayTear 2023-06-18 22:44:08 +02:00
Alan Coopersmith
cfcc51836c Remove "All rights reserved" from Oracle copyright notices
Oracle no longer includes this term in our copyright & license notices.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-04-09 08:51:31 -07:00
Tycho Andersen
74c03b4edf xinput: qualify CW as from xproto
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>
2023-03-23 20:43:58 +00:00
Alan Coopersmith
15d140d786 Add documentation for DAMAGE extension
Based on
https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/blob/master/damageproto.txt

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09 17:34:43 -08:00
Demi Marie Obenour
842d913162 Add documentation for Composite
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>
2022-10-16 01:56:43 -04:00
Demi Marie Obenour
bf228d330e Document BIG-REQUESTS
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2022-10-15 16:15:18 -04:00
Demi Marie Obenour
0d440c579b Add documentation for XFixes v6
This was previously added but was not documented.

Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
2022-08-08 21:03:53 -04:00
Mihail Konev
2386504947 autogen: add default patch prefix
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-24 14:39:55 -07:00
Emil Velikov
cf8ca75b7a autogen.sh: use quoted string variables
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>
2022-07-24 14:39:50 -07:00
Peter Hutterer
990cf120ae autogen.sh: use exec instead of waiting for configure to finish
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>
2022-07-24 14:39:50 -07:00
Alan Coopersmith
f6ede3004e gitlab CI: add a basic build test
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-23 11:02:54 -07:00
Demi Marie Obenour
0fc6197034 Document the MIT-SHM extension
This adds documentation for the entire MIT-SHM extension.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
2022-07-03 18:01:40 -04:00
Matt Turner
ed461f379b xcb-proto 1.15.2
Signed-off-by: Matt Turner <mattst88@gmail.com>
2022-06-17 13:56:42 -04:00
Matt Turner
e96f3b736a Call AC_OUTPUT without arguments
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>
2022-06-17 09:44:23 -04:00
Matt Turner
d849b9534a Install xcb-proto to $(datarootdir)
... i.e. to /usr/share/pkgconfig.

Signed-off-by: Matt Turner <mattst88@gmail.com>
2022-06-17 09:44:23 -04:00
Matt Turner
32c0ac61ec Remove libdir from xcb-proto.pc
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>
2022-06-17 09:44:20 -04:00
Matt Turner
0c64598d96 xcb-proto 1.15.1
Signed-off-by: Matt Turner <mattst88@gmail.com>
2022-06-16 11:35:14 -04:00
Mike Sharov
748b0f0098 Add DOUBLE-BUFFER extension specification. 2022-06-16 15:29:55 +00:00
Austin Shafer
b69b997c11 dri3: Update dri3.xml to DRI3 1.3
This adds DRI3SetDRMDeviceInUse.
2022-05-27 09:23:20 -04:00
Matt Turner
0997874864 xcb-proto 1.15
Signed-off-by: Matt Turner <mattst88@gmail.com>
2022-05-03 13:45:25 -07:00
Peter Harris
70ca65fa35 glx,xprint: place explicit padding between lists
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>
2021-12-21 06:25:29 +00:00
Joshua Root
be9c255b6b Adjust to automake 1.16.4 changes
The pythondir variable is now defined relative to ${PYTHON_PREFIX}.
2021-11-17 16:35:32 +00:00
Alex Richardson
c9be901595 Fix python version check from 65169c1af7
With commit 65169c1af7, I am seeing build
failures in libxcb, using sys.version_info fixes those.
2021-10-04 12:37:55 +01:00
Uli Schlachter
65169c1af7 Use xml.etree.cElementTree where appropriate
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>
2021-09-30 17:15:34 +00:00
Uli Schlachter
6d72110e1e Add missing fields to errors
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>
2021-09-30 17:15:34 +00:00
Povilas Kanapickas
151ee69847 xinput: Add XI v2.4
XInput 2.4 introduces touchpad gesture support which includes 6 new
events: Gesture{Pinch,Swipe}{Begin,Update,End}.
2021-09-22 14:53:06 +03:00
Povilas Kanapickas
f0db8b7d31 xinput: Add length specification for DeviceClass struct 2021-09-02 19:32:13 +03:00
Povilas Kanapickas
c36dde3f45 Add element to specify expression that defines length of a struct
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.
2021-09-02 19:32:13 +03:00
Olivier Fourdan
78d0652ac3 xfixes: Add ClientDisconnectMode
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>
2021-07-22 09:46:18 +02:00
Alan Coopersmith
b51f95645f xproto.xml: Update doc text for GrabKey
A little too much copy-and-paste from the GrabPointer doc text had
happened here.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-06-01 17:32:15 -07:00
Alan Coopersmith
496e3ce329 xcb-proto 1.14.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-10-08 15:29:51 -07:00
Samanta Navarro
0c31b8a29e Fix typo in documentation
Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
2020-10-03 11:38:13 +00:00
Björn Esser
029d5b5d70 xcbgen: Use xml.etree.ElementTree for Python >= 3.3.
In commit 7d58eed95f we started
to use xml.etree.ElementTree for Python >= 3.9.  In fact the
xml.etree.cElementTree module has already been deprecated
since Python 3.3.

Given this fact, we should start to use the xml.etree.ElementTree
module beginning with Python 3.3.

See: a72a98f24a

Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2020-06-04 21:08:08 +02:00
Björn Esser
7d58eed95f xcbgen: xml.etree.cElementTree has been dropped in Python 3.9.
It can be replaced with xml.etree.ElementTree safely.

Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2020-06-01 12:40:34 +02:00
Björn Esser
426ae35bee xcbgen: Use math.gcd() for Python >= 3.5.
fractions.gcd() has been deprecated since Python 3.5, and
was finally dropped in Python 3.9.  It is recommended to
use math.gcd() instead.

Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2020-06-01 12:40:34 +02:00
Uli Schlachter
2b3559c10c Parse a field's "enum=" correctly
In xv.xml, there is something like this:

  <struct name="ImageFormatInfo">
    [...]
    <field type="CARD8" name="byte_order" enum="ImageOrder" />
    <pad bytes="2" />
    <list type="CARD8" name="guid">
      <value>16</value>
    </list>
    [...]
  </struct>

When parsing this, the Field instance for "guid" ended up with .enum ==
"ImageOrder". This is because the loop that parses complex type did not
unset a variable across iterations, meaning that the last "enum"
property "stuck" and was also used for all following fields.

Fix this by simply moving the initialisation of the "enum" variable
inside of the loop.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2020-03-21 11:12:52 +01:00
Matt Turner
73d84bf39b Release xcb-proto 1.14
Signed-off-by: Matt Turner <mattst88@gmail.com>
2020-02-22 12:15:33 -08:00
Matt Turner
6d84602871 Build xz tarballs instead of bzip2
Signed-off-by: Matt Turner <mattst88@gmail.com>
2020-02-22 12:15:33 -08:00
Uli Schlachter
e79f6b01e0 Allow access to the original type in the XML
xcbgen 'helpfully' transforms things to C types already so that libxcb
does not have to do so. Thus, even though the XML says that a field has
type CARD8, xcbgen will claim uint8_t. This might be a bit weird, but is
so far totally fine.

However, the type mapping that xcbgen uses is not injective. All of
CARD8, BYTE and BOOL get turned into uint8_t and the original type is
lost.

This is totally fine for libxcb, but programming languages other than C
do have built in boolean types. My personal problem is with Rust, where
providing a boolean for an integer argument causes a compiler error.
This results in (relatively) ugly "0 / 1" instead of "false / true".

This commit adds a new xml_type member to SimpleType. This type contains
the original string that appeared in the XML file.

Since libxcb creates instances of SimpleType itself and to avoid
breaking the API, the new argument to SimpleType.__init__ defaults to
None.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-12-28 08:32:05 +00:00
Uli Schlachter
3cc42f6d23 Fix size computation of imported lists
XFixes contains a CreateRegion request:

   <request name="CreateRegion" opcode="5">
     <field type="REGION"    name="region" />
     <list  type="RECTANGLE" name="rectangles" />
   </request>

This request contains a list of type RECTANGLE. This struct comes from
xproto and is thus not contained in xfixes itself.

Normal "Struct"s have their resolve() method called early, because they
appear in the module itself. However, in the CreateRegion case, this
struct is imported and thus does not get resolved. Instead, ListType's
resolve() method calls self.member.resolve(module). Thus, only at this
point is the struct resolved.

Why is this important? Struct.resolve() is the same as
ComplexType.resolve() and this function does self.calc_size() at the
end. Thus, only after the struct was resolved is its size known. Before
that, the size is just set to 0 (this happens in ComplexType.__init__).

However, ListType.__init__ already computes its size member based on its
member. At this point, this is still 0 so the list ends up believing its
size to be zero.

Fix this by recomputing self.size in ListType.resolve().

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-12-28 08:30:47 +00:00
Uli Schlachter
7540642b34 Removed unused member "fds"
According to git grep '\.fds', this does not appear anywhere else in
xcb-proto or libxcb.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-11-02 14:45:10 +01:00
Daniel Stone
bd7a481a3b
pkg-config: Add sysroot prefix
xcb-proto's pkg-config file exports static file paths for where to find
its Python files and the XML definitions.

When used to discover cflags, library paths, etc, pkg-config will
prepend ${PKG_CONFIG_SYSROOT_DIR}, if any, to those paths. This makes
the use of a sysroot prefix transparent to users. However, since it
doesn't know about paths in custom variables, it cannot automatically
prefix this.

Adding ${pc_sysrootdir} to these absolute paths makes the behaviour
match, and XCB builds work out of the box in a sysroot.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-04-27 22:12:10 +01:00
Alan Coopersmith
dbf346502a Update README for gitlab migration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-02-17 10:54:09 -08:00