Since we need to glob the inputs we can't really know if anything has
changed, since a new file won't be registered unless the target runs
again. To avoid causing additional recompilation and linking, we only
actually write the generated .c if the inputs have changed, otherwise we
leave early, which results in the old file being used.
This bumps the required python version to 3.9, which is the oldest
supported version at the time of writing. This also switches some
strings to '' instead of "", to avoid escaping nested "
("\"foo\"" -> '"foo"')
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>
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: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>
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>
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>
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>
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>
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>