This will be needed by Xfbdev's keyboard driver, which cannot work
with input threads yet.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
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>
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>
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>
Previously, when parsing multiple configuration files containing the same
section names, only the last occurrence of each section would be retained.
Earlier definitions were silently discarded due to unconditional memory
allocation and overwriting of pointers during parsing.
This resulted in incomplete or incorrect configuration state when users
intended to merge or extend configuration through multiple files.
The section parsing functions in Files.c, Flags.c, and Module.c now
accept existing section pointers. These functions allocate new memory only
if the input pointer is NULL, preserving earlier data when re-parsing.
read.c has been updated to detect and pass existing section pointers when
encountering duplicate sections across files, preventing loss of prior content.
With these changes, the parser properly accumulates and merges configuration
data across multiple files, ensuring that all relevant settings are preserved.
Backport from Xorg.
References:
https://gitlab.freedesktop.org/xorg/xserver/-/issues/467https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2045Fixes: #279
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
Both are potentially tunable variables, and MAXCLIENTS is (still) used by
intel-driver, but also by os specific parts that must not include misc.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit changes legacy behavior, if anyone was relying on it,
they can make an issue and we can change it back.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
if the framebuffer device was passed by the user and not guessed
Assume the user knows what they are doing if they tell us to
use a particular framebuffer device, and skip the checks we
have for guessed devices
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
The fbdev pci probe doesn't use the fbdev passed by the user,
and instead tries to guess what framebuffer the user wants to use.
Only if that fails, fbdev falls back to the option passed by the user.
This is backwards, if the user explicitly passes a framebuffer
device to use, the X server should use that, and fall back on
guessing if that fails.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>