Not needed by any driver - only use as parameter to xf86ProcessActionEvent(),
which already is private.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The device node opening with seatd, like with systemd-logind can done during probe
(see get_drm_info in hw/xfree86/os-support/shared/drm_platform.c),
but in case of failure, the modesetting driver tries to open device
node directly (open_hw function in modesetting/driver.c).
This enchanes open_hw function to try use seatd arbiter for opening device node
in as last resort manner.
To make it functional seatd_libseat_open_graphics needs to have _X_EXPORT
Signed-off-by: tautvis <gtautvis gmail com>
Add necessary code into Xserver to support libseat (this time enabling
functionality).
Code used from Devuan repository + local changes to make functional in Xlibre
Co-Authored-By: Mark Hindley <mark@hindley.org.uk>
Co-Authored-By: Ralph Ronnquist <rrq@rrq.au>
Signed-off-By: Tautvis <gtautvis@gmail.com>
Add xf86VTKeepTtyIsSet function to export KeepTty state.
When seatd activates, it takes control of current vt (in global sense)!,
this code only activates sesion control code when XServer started
using same vt (for more context see c88a325899 commit ).
Signed-off-By: Tautvis <gtautvis@gmail.com>
Refactor libseat code for Xlibre and add to meson.build:
* update meson for seat-libseat
* refactor code:
* seatd-libseat.c - add aditional private include headers
* add cast to libseat_set_log_handler argument 1 for (libseat_log_func),
for warning silencing
* make seatd_libseat_init to accept keeptty state as parameter
* include xf86Events, xf86_priv - make visible xf86VTLeave for seatd code (it
is neccesary because seatd can force console leave)
Signed-off-By: Tautvis <gtautvis@gmail.com>
This is initial patch for libseat. Technicaly almost verbatim code (with style changes)
from Devuan xorg server moved to os-support/shared directory as it can support other
oses than linux.
The original repository: https://git.devuan.org/devuan/xorg-server.git
The patch between fc24510f17e89a5bbac1065abab758a4d0c42634 and
6bf62381d0
Co-Authored-By: Mark Hindley <mark@hindley.org.uk>
Co-Authored-By: Ralph Ronnquist <rrq@rrq.au>
Signed-off-By: Tautvis <gtautvis@gmail.com>
> ../hw/xwin/InitOutput.c: In function ‘XwinExtensionInit’:
> ../hw/xwin/InitOutput.c:142:5: warning: ‘LoadExtensionList’ reading 12 bytes from a region of size 0 [-Wstringop-overread]
> 142 | LoadExtensionList(xwinExtensions, ARRAY_SIZE(xwinExtensions), TRUE);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../hw/xwin/InitOutput.c:142:5: note: referencing argument 1 of type ‘const ExtensionModule[0]’
> In file included from ../include/extnsionst.h:53,
> from ../randr/randrstr.h:40,
> from ../hw/xwin/win.h:174,
> from ../hw/xwin/InitOutput.c:35:
> ../include/extension.h:100:23: note: in a call to function ‘LoadExtensionList’
> 100 | extern _X_EXPORT void LoadExtensionList(const ExtensionModule ext[],
> | ^~~~~~~~~~~~~~~~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
the target struct type defines char* fields, but we're sure they'll
never be written into, so just add typecast for silencing the warning.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The space needed to store these extra values is at worst a few dozen bytes.
In exchange for these, larger cursors glyphs can use a more optimal cursor size.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Make the code a bit easier to read by using initialization of the reply
structs, at the point of declaration. Most of them aren't written to later,
just passed into WriteReplyToClient(). Also dropping some useless zero
assignments (struct initializers automatically zero-out unmentioned fields).
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
After the dmabuf fd exported by another screen is imported to a pixmap,
the pixmap holds a reference for the buffer, thus the FD itself finished
its job and needs to be closed to prevent a stale reference to the
buffer.
Signed-off-by: Icenowy Zheng's avatarIcenowy Zheng <uwu@icenowy.me>
Nothing in there that we need, include <regionstr.h> instead.
But keeping the file in place, until all external consumer have
been migrated.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Adding new source and header that's going to host all DIX
settings (set via cmdline or xf86 config file) in the future.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
dixRegisterPrivateKey() assumes that DevPrivateKeyRec struct passed
to it is zero-filled before the first use, otherwise assert() fails.
Therefore these structs are usually static, which assures that they
are initialized to 0. A newly introduced key in the modesetting driver
was not static, and the driver crashed. This should be corrected.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
The driver directory name now includes a version tag, and the configure code has to search in the right directory.
Signed-off-by: alex14fr <alex14fr@gmail.com>
It is patch 2/2 of a series that provides a convenient way to specify
module search paths on a per-driver basis.
This entry proved to be useful in InputClass, so added it to OutputClass
as well. This allows to configure graphic drivers separately depending
on server layout names.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
It is patch 1/2 of a series that provides a convenient way to specify
module search paths on a per-driver basis.
This patch allows to set ModulePath for certain modules, in particular,
GPU drivers.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
Still needs to be _X_EXPORT'ed for internal modules, but
not supposed to be visible to external drivers.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
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>