Both types are already binary equal: both are enums using the same bit values,
but from compiler's perspective they're still different types, so it's warning.
> ../glamor/glamor_trapezoid.c:123:47: warning: implicit conversion from
> enumeration type 'PictFormatShort' (aka 'enum _PictFormatShort') to different
> enumeration type 'pixman_format_code_t' [-Wenum-conversion]
> 123 | image = pixman_image_create_bits(picture->format,
> | ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~^~~~~~
> 1 warning generated.
The PICT_* fields, values and macros are relics from pre-pixman days (pixman,
historically, essentially is the PICT_* stuff moved out to separate library)
This has been a practical way for doing the transition from the old internal
PICT_* code to pixman. Now it's time to finish it all up and drop the extra
glue layer.
In order to make it smooth, and also providing backwards compatibility for
drivers (until they all keep up), just aliasing the types and adding #define's
for the enum values.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
All source files need to include it anyways, so no need to include it here,
and neither having an extra check for HAVE_DIX_CONFIG_H
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The authProto field always is assigned to dynamically allocated buffer
(strdup()'ed) and needs to be freed sometimes, so cannot be const.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The epoll-shim dependency did not get detected on FreeBSD,
because of missing prefix and dependency arguments in has_function()
call in include/meson.build.
Also added the path of epoll-shim headers include directory
(/usr/local/include/libepoll-shim/) to the compiler include search
paths for proper detection and build.
Signed-off-by: b-aaz <b-aazbsd@proton.me>
A socket() call either returns a valid socket fd or -1, there's no need for
trying to check whether the returned fd is out of the OS's allowed range
of fd's, because if it would, the kernel would return error anyways.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
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>