some bit better naming for config symbols.
Yet leaving the old one defined, until all drivers have kept up.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
../glx/indirect_table.c
In file included from ../glx/indirect_table.c:28:
In file included from ../glx/glxserver.h:66:
../include/glx_extinit.h:33:28: warning: redefinition of typedef '__GLXscreen' is a C11 feature [-Wtypedef-redefinition]
33 | typedef struct __GLXscreen __GLXscreen;
| ^
../glx/glxscreens.h:113:28: note: previous definition is here
113 | typedef struct __GLXscreen __GLXscreen;
| ^
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
On FreeBSD the ALIGN macro already exists in the standard headers,
so we sholdn't redefine it here.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Use x_rpcbuf_t for reply payload assembly and byte-swap, instead of
writing in little pieces via complicated callbacks.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Skip allocation of temporay buffer for the atom IDs, instead walk through
the property list and write the IDs directly into the rpcbuf.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
x_rpcbuf_t allows easy accumulation of payload data and doing byteswap
(when necessary) at the same time.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Use x_rpcbuf_t for reply payload assembly and byte-swap, instead of
writing in little pieces via complicated callbacks.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Use x_rpcbuf_t for reply payload assembly and byte-swapping, instead
of writing in little pieces via complicated callbacks.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Use x_rpcbuf_t for reply payload assembly and byte-swapping, instead of
writing in little pieces via complicated callbacks.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Since nobody's passing in extra data here anymore, this function
can be radically simplified now.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Move up the check for broken/NULL transport connection in order to
simplify the code a bit more.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
First step for simplifying the output path - this is really complicated now:
FlushClient() is called in two cases:
a) we really need to send out critical data (eg. critical events now),
here we have no extra data
b) going to write new data in the output buffer, but it's already full
here we do have extra data
In case b) (only called from WriteToClient()) we're first trying to write out
as much as we can, and if there's still not enough room, the buffer is resized.
The write-out path is a complex look trying to write buffered data first, then
the new data. That's even more complex since using writev() with 3 pieces
(old buffer, new data, padding), and considering each of those could be written
just partially.
By the way, there's really no need that the new data is strictly written
along with the already buffered one - practically that's not even any actual
performance optimization - so it's just making things unncessarily complicated.
Therefore reduce it to what's really needed: ensure enough room in the output
buffer (and potentially flush out or resize the buffer). In a later, remove the
whole extra data part from FlushClient(), as it's not needed anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
It's such a cold and rarely used path, we really don't need writev() for
efficiency, so instead doing two trivial write()'s. And the complex size
calculation as well as extra padding isn't necessary, if we just make
the string of size 4*n.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Allow building with udev features, eg. XORG_PLATFORM_BUS.
Using libudev-devd, which provides a libudev api while speaking to devd.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
As more kdrive-based servers are coming, it's time to refactor the meson
structure a little bit, so all kdrive specific logic is in its own subdir.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
It is patch 5/5 of a series that refactors matching input and output devices to classes and
extends possibilities to describe them, in particular, it allows use of regular expressions.
Manual page is updated.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
It is patch 4/5 of a series that refactors matching input and output devices to classes and
extends possibilities to describe them, in particular, it allows use of regular expressions.
This patch introduces matching against a regular expression using regex library.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
It is patch 3/5 of a series that refactors matching input and output devices to classes and
extends possibilities to describe them, in particular, it allows use of regular expressions.
This patch defines a function MatchAddrToken that actually matches an attribute against
a list of pattern groups (in fact, Match... lines). It is used to check whether a particular
input/optput class should be applied to a device, thus replacing the tangled and difficult
to control code in InputClass.c and OutputClass.c.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
It is patch 2/5 of a series that refactors matching input and output devices to classes and
extends possibilities to describe them, in particular, it allows use of regular expressions.
This patch adds a function xf86createMatchGroup to build a pattern group from a string in
MatchProduct, MatchDevice or similar directives. It implements rudimentary logic ("or",
"and", and "not") to construct complex conditions for a device to an input/output class
to be applied based on the device attributes. Also xf86printMatchPattern is defined, which
is necessary to save an actual config file. Pattern groups are not used for matching yet,
the original functionality is preserved.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
It is patch 1/5 of a series that refactors matching input and output devices to classes and
extends possibilities to describe them, in particular, it allows use of regular expressions.
This patch introduces enum xf86Match for different modes of matching present in Xserver code:
case sensitive/insensitive, equal strings, being substring, comparison of filenames or
pathnames etc, and introduces struct xf86MatchPattern to hold a pattern together with a mode.
These types are not used yet.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
Reduce complexity for things that really don't matter much:
The ddxBeforeReset() function is called when the Xserver going to reset
(new server generation). Right now, the only DDX really needing that is
Xwin, on all the others it's just no-op.
We've got an extra complicated build logic, which ifdef's out this all when
Xwin isn't built at all. The saving is extremely minimal - just skipping
few stub functions, which in most sessions aren't even called.
Therefore, get rid of this extra complexity that isn't giving us any
notable gain.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
For strange reaons, nanosleep() is in libpthread on mingw platform,
so we have to link it here.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
We don't need it at all (and even shouldn't use it), and this breaks
the win32/mingw build.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Yet one more clash between <windows.h> and Xserver on `CreateWindow` symbol:
The windows header has a `#define CreateWindow CreateWindowA`, so we need
to #undef it everywhere we're using `CreateWindow` - until we've got that
ugly header out of the way completely.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
We neither need to guard including <sys/time.h> from mingw, nor do we
need that include here at all.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
IgnoreABI option is kept in a single bit of an unsigned long variable
LoaderOptions that has no other use.
This patch replaces it with a variable named LoaderIgnoreAbi
and a proc for setting it.
Inspired by b61b35a0b3
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
On WIN32 we need to include winsock2.h, but we can't include misc.h here
becaues it pulling in X11 headers that are conflicting with win32 headers.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of redefining existing standard libc symbols, pick another symbol
that's mapped to the corresponding platform specific function.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
mingw's printf() doesn't understand it yet, and it's not really
important here, so just use `%hx` instead.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The only option left is TRANS_NONBLOCKING, and we only enable and
never disable it. Thus trim down the code into one function for
exactly that.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This reverts commit b1ff69a654.
broke the docs build ... and it also seems certain pieces got even missing.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>