Commit graph

66 commits

Author SHA1 Message Date
Alan Coopersmith
d5435b07a8 Update submodule URL from anongit to gitlab
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxcb-errors/-/merge_requests/7>
2024-09-07 11:35:30 -07:00
Alan Coopersmith
de938c69f3 gitlab CI: Use Xvfb to allow all tests to run
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-12-13 00:47:31 +00:00
Uli Schlachter
fad9c433f5 Fix tests
The tests also use some non-existing events to check that these are
handled correctly. Then came XI 2.4 and introduced several new events,
which broke the test.

Fix this by updating the test accordingly.

This means tests will now fail when using an older version of xcb-proto.
If you are affected by this, either do not run tests, or build against a
newer version of xcb-proto.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2023-12-08 17:43:53 +01:00
Alan Coopersmith
f85a73865a Add README.md
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-10-18 18:23:00 -07:00
Alan Coopersmith
517dd82c07
xcb-util-errors 1.0.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-10-18 18:10:25 -07:00
Mihail Konev
8a2812f603 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:07:36 -07:00
Emil Velikov
f968311042 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:06:29 -07:00
Peter Hutterer
0fb1c07367 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:06:29 -07:00
Alan Coopersmith
50574404bd autogen.sh: Honor NOCONFIGURE=1
See http://people.gnome.org/~walters/docs/build-api.txt

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-24 14:06:29 -07:00
Alan Coopersmith
3de8874f5d configure: Drop AM_MAINTAINER_MODE
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-24 14:06:29 -07:00
Alan Coopersmith
b33178bb4a gitlab CI: add a basic build test
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-20 15:24:15 -07:00
Alan Coopersmith
e2bfc8115d Update m4 to xorg/util/xcb-util-m4@c617eee22ae5c285e79e81
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-20 14:58:19 -07:00
Alan Coopersmith
4440550baf Use AC_CONFIG_FILES to replace the deprecated AC_OUTPUT with parameters
configure.ac:33: warning: AC_OUTPUT should be used without arguments.
configure.ac:33: You should run autoupdate.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-06-18 10:20:08 -07:00
Alan Coopersmith
a40b2df701 Build xz tarballs instead of bzip2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-06-18 10:19:06 -07:00
Uli Schlachter
5d660ebe87 Do not distribute extensions.c and fix out-of-tree builds
It all started with src/extensions.c being distributed. Thanks to this, tarballs
shipped with this generated file and actually building this file was skipped.
Fix this by using the nodist_ variant of the SOURCES variable.

Due to this oversight (sorry!), the out-of-tree build wasn't actually tested.
The rule that generates src/extensions.c was missing $(srcdir) in front of the
path to extensions.py. This rule is now fixed and, as suggested by Daphne
Pfister, also changed to explicitly call the python interpreter. Configure is
changed to look for it.

Finally, extensions.c couldn't include errors.h. This worked before, because the
C compiler automatically looks for headers in the same directory as the source
file. However, for out-of-tree builds, the source directory and build directory
are different. Paper over this problem by explicitly making it look in the right
directory.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=90328
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-05-06 08:16:54 +02:00
Uli Schlachter
332f357aa6 set version to 1.0
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-26 16:07:45 +02:00
Uli Schlachter
33fdb244ed Add COPYING file
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-26 15:59:16 +02:00
Uli Schlachter
7e5cb24eb4 tests: Add some XFixes-based tests
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-06 16:44:45 +02:00
Uli Schlachter
5f13d59080 Add xcb-proto version to xcb-errors.pc
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-06 16:37:22 +02:00
Uli Schlachter
4911a0c8c3 Also add a test for maximum major code
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-06 16:28:08 +02:00
Uli Schlachter
ac6b8d8912 Re-add a missing length check
This check was accidentally removed in commit 4ed12c46de.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-06 16:18:22 +02:00
Uli Schlachter
54e2145e11 Ignore "event sent" flag in event codes
The highest bit of an event code shows if the event was generated by the X11
server or via the SendEvent request. Ignore this bit in all places that handle
event codes.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-06 16:16:32 +02:00
Uli Schlachter
0095e43185 Update doxygen comments
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-05 14:59:16 +02:00
Uli Schlachter
594120dff4 Rename *_get_name_for_event()
Now that there are three different functions for querying information about
events, there shouldn't be one which monopolizes on the "_for_event" name.
Instead, the preferred API is the "_for_xcb_event" function.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-05 14:39:20 +02:00
Uli Schlachter
861fc2c169 Handle NULL as context argument
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-05 14:37:24 +02:00
Uli Schlachter
64fa1e695b Use unchecked QueryExtension requests
If this ever causes an error, the underlying event loop at least gets the chance
to print something useful.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-05 14:13:34 +02:00
Uli Schlachter
2d0d25aae0 Update KNOWN_ISSUES (and turn it more into a TODO)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-05 14:02:01 +02:00
Uli Schlachter
964a2b5350 Add a function for figuring out information about an event struct
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-05 13:49:07 +02:00
Uli Schlachter
63ca7f6c88 tests: Use attribute((format(printf,x,y))) if possible
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-05 13:46:23 +02:00
Uli Schlachter
88cebd842e API docs: Clarify when NULL is returned
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-05 13:45:23 +02:00
Uli Schlachter
58b38aff25 Fix copy&paste error
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-05 13:41:20 +02:00
Uli Schlachter
b82a03f403 Test: Factor out string-comparision helper function
This function compares strings, handles NULL (almost) correctly, prints an error
if a mismatch occurs and returns a suitable int result.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 23:18:03 +02:00
Uli Schlachter
3a6db57743 Test suite: Add tests for XGE event handling
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 17:37:47 +02:00
Uli Schlachter
cd2372e6ba Add a function for handling XGE events
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 17:37:10 +02:00
Uli Schlachter
a66bb6b232 Code generator: Add support for XGE events
This also pretends that XKB has XGE events since that extension has its own
event multiplexing.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 17:28:36 +02:00
Uli Schlachter
5cf2876228 Save static info as a pointer instead of copying it
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 16:51:35 +02:00
Uli Schlachter
0ebef8dd7f Move extension name into static info
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 16:49:58 +02:00
Uli Schlachter
322f2e1b81 Document failure scenarios for *_new()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 16:46:07 +02:00
Uli Schlachter
862579778a Also return the extension name for events and errors
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 16:45:47 +02:00
Uli Schlachter
fb56799357 Correctly handle calloc() failure
If an extension that we support is not present in the X11 server, this is not a
fatal error. We can just skip this extension. However, the code implementing
this accidentally also made calloc()-failures non-fatal which is wrong.

Spotted by Ran Benita.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 16:17:29 +02:00
Uli Schlachter
761079ac8a Test: Skip tests if no X11 server is available
This was suggested by Ran Benita, thanks!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 16:17:09 +02:00
Uli Schlachter
4ed12c46de Don't check codes to be in range, but find "best match"
If some new events are added to an extension, older implementations register a
smaller portion of the event number space than this library possible knows. So
we cannot just look for some extension that has some code "in range", but we
need to find the best one (with the largest base).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 10:59:12 +02:00
Uli Schlachter
9f93cefb40 Fix test suite compilation
This didn't find xcb_errors.h for out-of-tree builds. Fix this by using
$(srcdir) correctly.

Also, the test suite makes use of libxcb and thus should link against it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-04-04 10:37:05 +02:00
Uli Schlachter
40fdc28891 Add a KNOWN_ISSUES file
Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
2015-03-25 10:56:01 +01:00
Uli Schlachter
f6a28cbbad test: Also test minor requests for some core requests
Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
2015-03-25 10:53:04 +01:00
Uli Schlachter
863ada16c1 Code generator: Print a warning for xge events
These are currently not handled correctly.

Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
2015-03-25 10:51:56 +01:00
Uli Schlachter
c4c9a4f098 Skip XKB events in the code generator
Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
2015-03-25 10:51:38 +01:00
Uli Schlachter
95539d3c96 tests: Add tests for RandR
Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
2015-03-25 10:51:15 +01:00
Uli Schlachter
059bfdbed8 Add an autotools-based build system
This is based on util-cursor's build system and libxcb/configure.ac for finding
xcb-proto's XML files.

Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
2015-03-25 10:32:21 +01:00
Uli Schlachter
456a9a6f0c Correctly ignore extensions without events / errors
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-03-24 21:59:37 +01:00