When rapidly switching vt's, it can happen that shadow tries to
draw to the screen before it's initialized.
In that case, we return NULL, and we should also return a zero size,
because shadow doesn't check for NULL.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Zapping is the fastest way to kill the X server, faster than vt switching,
or killing the window manager and configuring the X server to die with it.
It is very useful when debugging, or if the system runs very low on memory
This adds the `-nozap` argument, for restoring the old behavior.
The `-zap` argument is also kept for backwards compatibility.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
It should now work out of the box on most setups
with one mouse and one keyboard.
It probably still breaks on some single mouse and keyboard
setups, and on setups with more than one mouse or keyboard.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This is needed for Ctrl + Alt + F* vt switching
and Ctrl + Alt + Backspace server terminate.
We could implement other special keys too, it we want to.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
We're only interested in vt switching here.
Ctrl + Alt + Backspace server terminate will be handled by it's caller.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This is needed to get proton working in Xfbdev, but is probably useful in other places too.
Xephyr has some unrelated issues regaring Xinput, so steam doesn't work there.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Since we're always terminating now, everbody can call UnlockServer()
directly, so we don't need that extra function anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of directly accessing the global screenInfo.screens[] array,
let everybody go through a little inline helper. This one also checks
for array bounds - if the screen doesn't exist, return NULL.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
iterating over screen list via lambda-esque macros calls like this
DIX_FOR_EACH_SCREEN({
do_something
});
withing the body, the iterator variables `walkScreenIdx` and `walkScreen`
are defined and can be directly used (read-only). the code inside the body
is running in a separate scope.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Don't rely on this file just being included indirectly by somebody else
just by accident.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Nobody's using this pointer anymore, everybody's using the global
screenInfo structure.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
We only have one global screenInfo struct ever, and many other parts of the
Xserver can only operate on global screenInfo, so it's time to phase out
this extra pointer. Once the same has done on the other DDXes, it will
be dropped from InitOutput()'s parameter list.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
in preparation of upcoming generic screen iterator macros, already
rename the index variable to what the macro will be using.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
These are just used locally and always assigned at loop body start,
so it's cleaner to declare them locally inside the loop body.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Bug slipped through: we have to substract the coordinates from the walked
screen to the current one, instead of the walked one from itself :o
Fixes: 97d72431cf
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
They are all disabled for now, build options for enabling them
will be added when Xfbdev is added.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
The keyboard input driver that will be added to kdrive
only works with old SIGIO code, and doesn't work with
the new threaded input that kdrive uses.
All the code is behind #if's that are never satisfied,
so this commit has no functional changes.
In preparation for adding the Xfbdev X11 kdrive server.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
The keyboard input driver that will be added to kdrive
only works with old SIGIO code, and doesn't work with
the new threaded input that kdrive uses.
All the code is behind #if's that are never satisfied,
so this commit has no functional changes.
In preparation for adding the Xfbdev X11 kdrive server.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>