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>
The 'mode' argument for open() is only used when files
are created, and files aren't created here.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
In preparation of potentially more drivers being move in-tree,
put the input drivers into `input` subdirectory.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
In preparation of potentially more drivers being move in-tree,
put the video drivers into `video` subdirectory.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
And OS/platform callback by which individual server implementations
can extra event polling, eg. device IO.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
New OS/platform callbacks that are called when screens are enabled
or disabled. This allows individual Kdrive implementations to take
specific action, eg. configure/reset graphics hardware.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
For better code structuring, move the meson logic for drivers into the
drivers/ subdir.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
No need to have extra check for whether the Atom already exists,
just create it on demand.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
These are always enablde (x11_t is defined when XSERV_t is defined),
so no need for the #ifdef's anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Not supposed to be written to (once the pointer is assigned),
so should be marked const. Also document KdOsInit()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
These will be used by subsequent commits for generic Kdrive
functions calling back into the OS specific parts
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Kdrive X servers used to do the OS-speciffic init part using KdOsInit.
This was changed in modern Xorg because Xephyr is the only kdrive
X server there, so there was no need to keep this generic.
Since we want to eventually add Xfbdev, we need to add this back.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Some display drivers might cause p->atoms to be null if the display is
disabled. This will cause segfault when checking
if p->atoms[0] != property .
Some display drivers owned by qualcomm is known to cause this bug.
Signed-off-by: fish4terrisa-MSDSM <flyingfish.msdsm@gmail.com>
This symbol is always defined, and the header is always present,
so no need to check for it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Directly calling abort() doesn't print a stack trace, nor any useful message.
Instead FatalError() should be used in cases, where there's really no other
way than terminating the Xserver. The FatalError function also tries to make
a smooth shutdown (eg. resetting video mode), so console doesn't end up locked.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The passed name buffer isn't changed by those functions ever
(it would be a bug if they did so), therefore it should be const.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ../hw/xquartz/mach-startup/bundle_trampoline.c:53:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> static char *executable_path() {
> ^
> void
> 1 warning generated.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
In CheckVersion() the errtype variable is used in two separate scopes,
but not globally, so it's cleaner to have it only in the scopes that
are actually using it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
For better readability and robustness against future changes, it's
better to use named struct initializers instead of array-like lists.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
In xnestOpenScreen(), some compilers/analyzers spitting out a false alarm on
`defaultVisual` field potentially used uninitialized. This can't practically
happen, but not all compilers/analyzers really can see that.
Adding a zero initializer doesn't cost us anything, so silencing that false
alarm is trivial.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The Linux kernel has long had code preventing Xorg from using atomic
modesetting due to various bugs in it's implementation, some of these
issues have since been fixed but some issues remain namely with DPMS
and other smaller things, we should allow users to opt-in by setting
"Option 'Atomic' 'True'"
This shouldn't cause any issues as the feature remains disabled by default.
Co-authored-by: Daniel Abrecht <public@danielabrecht.ch>
Signed-off-by: notbabaisyou <though-went-some-simple@proton.me>