Commit Graph

171 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult d08631bef1 minor release 25.0.0.2
minor bugfix release.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 12:44:45 +02:00
Enrico Weigelt, metux IT consult f5ea9069e1 release 25.0.0.1
minor bugfix release

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-24 17:46:26 +02:00
Enrico Weigelt, metux IT consult 4e1515f793 meson.build: fix release date variable
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-23 15:42:47 +02:00
Enrico Weigelt, metux IT consult 40dc3b6419 Xlibre release 25.0.0.0
Summer solstice 2025.
Initial release of Xlibre Xserver.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-21 11:51:45 +02:00
Enrico Weigelt, metux IT consult f5d4657d0d meson.build: add deprecation warning on HAL
When HAL is enabled, print out a warning that it's deprecated and
might be removed soon.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-17 20:41:48 +02:00
Enrico Weigelt, metux IT consult c8b81fdbc5 drop Xwayland
It always had it's own lifecycle (not been part of Xorg releases),
doesn't make sense to maintain a competing implementation that we
won't use anyways.

Once that's gone, we can also drop few things in core/dix that had
been added just for xwayland only.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-17 12:51:36 +02:00
Enrico Weigelt, metux IT consult 4379f7cc87 Xnamespace: namespace extension skeleton
Add tiny skeleton for the namespace extension. Disabled by default,
can be enabled via +extension arg, but doesn't actually do something yet.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult 49c6431695 xfree86: add per major-version driver/module subdirectories
Modules are now placed into a sub-directory by major Xserver release,
so we have less hassle with trying to load drivers w/ incompatible ABI.

The legacy directories are still searched (after the versioned ones)
for backwards compat with badly maintained proprietary drivers (Nvidia).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult 945edb0186 meson.build: move writing conf_data into tail of main meson file
This allows us to do further probing in the included meson files:
Individual subdirectories (eg. DDXes, extensions, OS layer, ...)
can now probe things that are only relevant to them - no need to fill
the already too fat includes/meson.build with even more things.

Preparation for upcoming commits that'll make us of that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:46 +02:00
Enrico Weigelt, metux IT consult 9a82f5c30b drop remains of cygwin support
Cygwin support doesn't seem to be used anymore, so it can be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:46 +02:00
Enrico Weigelt, metux IT consult 4bc4ad19aa meson.build: fix missing dependencies in xorg-server.pc
xorg-server.pc missed a few dependencies, so consumers might not
get them and break build.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:46 +02:00
Enrico Weigelt, metux IT consult 5913906151 Xnest: dont link Xlib anymore
Now that we completely ported from Xlib to XCB, we can finally stop
importing Xlib :)

FIN.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:45 +02:00
Peter Hutterer 4966fbb55a meson.build: print a summary of the DDX to build
Makes it easier to detect accidentally "oops, i'm not building Xwayland"

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1869>
2025-03-24 03:05:35 +00:00
Enrico Weigelt, metux IT consult 2e6f3a632b meson.build: enable VLA warning
variable length arrays can be dangerous, so better don't use
them at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1819>
2025-02-20 17:28:05 +01:00
Olivier Fourdan 1ccc19d1df build: Bump wayland-protocols requirement to 1.38
To get xdg-system-bell-v1 protocol.

This is just preparation work for the next commits.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1742>
2024-12-02 08:55:34 +00:00
Alan Coopersmith 4accb821f2 meson: list required version of xproto headers in xorg-server.pc
Many of the SDK headers use the _X_* helper macros from Xfuncproto.h,
so list a dependency on them so the right path & version are used when
building out-of-tree loadable modules such as drivers.

Raises required version of meson to 0.58.0 to support format strings.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1668>
2024-09-09 07:48:07 -07:00
Olivier Fourdan 8fe15a60c5 build: Fix DRI3 on DragonFly and OpenBSD
Commit 96bdc156 added a check for <sys/eventfd.h> to enable DRI3.

DragonFly and OpenBSD however rely on epoll-shim for <sys/eventfd.h>,
so that must be added as a dependency for the <sys/eventfd.h> check.

Fixes: commit 96bdc156 - xwayland: Do not enable DRI3 without eventfd
Suggested-by: Jan Beich <jbeich@freebsd.org>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1642>
2024-09-02 11:52:26 +00:00
Olivier Fourdan 673b56e61c build: Move epoll dependency check
DragonFly and OpenBSD rely on epoll-shim to provide eventfd.

Move the check for epoll dependency to the root meson.build script so
that we can use that for the <sys/evenfd.h> check as well.

This is preparation work for the following commits, no functional change
intended at this point.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1642>
2024-09-02 11:52:26 +00:00
Olivier Fourdan 96bdc156a1 xwayland: Do not enable DRI3 without eventfd
DRI3 version 1.4 which supports explicit buffers synchronization relies
on the eventfd interface.

As result, building would fail with DRI3 enabled on platforms without
the eventfd interface.

Check for the availability of the sys/eventfd.h header and disable DRI3
support if missing.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1523>
2024-08-05 10:24:58 +02:00
Alan Coopersmith f3b43adf3a meson: make AF_INET6 check work with stricter compiler flags
Previously it failed with:
_build/meson-private/tmpr7qpcbo1/testfile.c: In function 'main':
_build/meson-private/tmpr7qpcbo1/testfile.c:7:5:
 error: old-style function definition [-Werror=old-style-definition]
    7 | int main() { int foo = AF_INET6; }
      |     ^~~~
_build/meson-private/tmpr7qpcbo1/testfile.c:7:18:
 warning: unused variable 'foo' [-Wunused-variable]
    7 | int main() { int foo = AF_INET6; }
      |                  ^~~

Fixes: bc55a98d6 ("meson: explicitly check whether AF_INET6 is available")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1627>
2024-07-27 11:59:34 -07:00
Enrico Weigelt, metux IT consult ab701418b2 meson.build: disable udev on platforms not having it
Several more platforms lacking udev haven't been catched yet.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1577>
2024-07-25 23:59:37 +00:00
Enrico Weigelt, metux IT consult bc55a98d62 meson: explicitly check whether AF_INET6 is available
We're currently not checking whether IPv6 is available before build,
so it just gets silently disabled if AF_INET6 is missing - even
when user wants to enable it explicitly. Adding explicit check into
meson.build, so failing when ipv6 option enabled, but no IPv6 supported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1539>
2024-06-18 01:59:33 +00:00
Enrico Weigelt, metux IT consult 842e866155 xnest: don't silently disable Xnest
The current implementation silently disables Xnest, even if requested
explcitly. That's a bit unstable behaviour - it's better to break the
build in those cases, just disable silently in auto mode.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1534>
2024-06-18 01:44:26 +00:00
Enrico Weigelt, metux IT consult 1ead670476 xnest: don't force it off on Windows
No reason to explicitly force it off on Windows - if dependencies are present,
we can build it. Even though it will be rarely needed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1534>
2024-06-18 01:44:26 +00:00
Erik Kurzinger 87bf2cafcc xwayland: add support for wp_linux_drm_syncobj_v1
This protocol allows for explicit synchronization of GPU operations by
Wayland clients and the compositor. Xwayland can make use of this to
ensure any rendering it initiates has completed before the target image
is accessed by the compositor, without having to rely on kernel-level
implicit synchronization.

Furthermore, for X11 clients that also support explicit synchronization
using the mechanisms exposed in the DRI3 and Present extensions, this
Wayland protocol allows us to simply forward the timeline, acquire, and
release points directly to the compositor, ideally avoiding any
premature stalls in the presentation pipeline.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967>
2024-04-09 06:11:03 +00:00
Erik Kurzinger 6f85ce4d4e xwayland: support DRI3 1.4 and Present 1.4
Together, DRI3 1.4 and Present 1.4 allow clients to explicitly
synchronize GPU rendering with presentation using DRM syncobjs. Here we
add the necessary support to Xwayland's glamor and Present
infrastructure to enable this functionality.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967>
2024-04-09 06:11:03 +00:00
Erik Kurzinger ac0bc0b3b6 Present: add PresentCapabilitySyncobj and PresentPixmapSynced
Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967>
2024-04-09 06:11:03 +00:00
Erik Kurzinger 613dcb6a77 DRI3: add DRI3ImportSyncobj and DRI3FreeSyncobj
Adds the required infrastructure in the core DRI3 code to support
importing DRM synchronization objects from clients. This includes
support for the two new protocol requests from DRI3 version 1.4, an
internal representation of these objects in the form of the dri3_syncobj
structure, and an import_syncobj screen info callback.

The following operations are defined for dri3_syncobj objects
* free - release any server-side resources associated with the object
* has_fence - check if the fence for a timeline point is submitted
* is_signaled - check if a timeline point is signaled
* export_fence - return a sync fd corresponding to a timeline point
* import_fence - submit a sync fd as the fence for a timeline point
* signal - immediately signal a timeline point
* submitted_eventfd and signaled_eventfd - register an eventfd to be
  signaled when the given timeline point is either submitted or
  signaled

Implementations will be responsible for populating these function
pointers when importing a syncobj.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967>
2024-04-09 06:11:03 +00:00
Erik Kurzinger f051a2449d DRI3: provide stub implementation of DRI3SetDRMDeviceInUse
DRI3 version 1.3 introduced a new request which allows clients to
provide a hint to the server about which DRM device they are using, so
that the server might return DRM format modifiers specific to that
device. However, implementing such functionality, for Xwayland in
particular, will require fairly significant architectural changes.

To avoid blocking future versions of the DRI3 extension, we provide here
a stub implementation for the request in question. The spec explicitly
states that it is only a hint that the server is free to ignore, so
strictly speaking this implementation is still correct.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967>
2024-04-09 06:11:03 +00:00
Enrico Weigelt, metux IT consult e3d391b9c6 test: fix FTBS on missing xlib includes on NetBSD
When X11 isn't installed directly at /usr hierarchy (eg. NetBSD uses
/usr/X11R7/), build breaks:

../test/list.c:31:10: fatal error: X11/Xlib.h: No such file or directory
   31 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~

Needs explicitly dependency on libX11, so the include path is added.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1442>
2024-04-01 23:41:22 +00:00
Enrico Weigelt, metux IT consult 58117a0c3e meson.build: move manpage specific stuff to man/ subdir
Tidy up the huge file a little bit.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1433>
2024-03-21 23:07:13 +00:00
Olivier Fourdan 98692300f5 build: Bump wayland-protocols requirement to 1.31
This is needed to support the "wp-fractional-scale-v1" protocol.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-By: Kenny Levinsen <kl@kl.wtf>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1197>
2024-03-20 09:05:36 +01:00
Olivier Fourdan 701284f057 xwayland/glamor: Drop the EGLStream backend
Now that the NVIDIA proprietary driver has grown support for GBM, the
EGLStream backend for NVIDIA GPUs is now superseded by the standard
GBM backend in Xwayland.

This code path is therefore not used and hardly ever tested.

Remove support for EGLStream in Xwayland.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:17 +00:00
Olivier Fourdan a692ded3d9 build: Xwayland with GLAMOR requires libxshmfence
Without libxshmfence, Xwayland cannot build with GLAMOR support.

Make sure to catch that requirement in meson rather than failing the
build later.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1626
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1253>
2024-03-03 23:29:40 +00:00
Olivier Fourdan 2ebde20eef build: Use a variable for the xshmfence version
No functional change.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1253>
2024-03-03 23:29:40 +00:00
Enrico Weigelt, metux IT consult 40c5d39c55 include: move xsha1.h to os/
This header is never exported and belongs to OS layer, thus no need to have it
in include/ directory, where all the public ones are - better off under os/.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1350>
2024-03-03 23:11:05 +00:00
Enrico Weigelt, metux IT consult fe1e2b7b3d dix: unexport and move maxBigRequestSize
* this symbol is a server configuration flag (can be passed via cmdline)
  for limiting the max size of big-requests. there shouldn't be any need
  to use it outside the core X server (in server modules like drivers
  or external extension) - therefore unexport it
* in order to reduce namespace pollution of public (server module API)
  headers, create a new internal header for those tings (more to come)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1275>
2024-02-23 23:19:32 +00:00
Olivier Fourdan 7fdef970c4 build: Switch to meson 0.56
And replace the deprecated meson API accordingly.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2024-01-08 10:38:05 +00:00
Sam James 515b240a24 meson: add option for systemd_notify
Without this, systemd will be used if installed on the system automagically,
which is a problem if the built e.g. Xwayland is going to be used on a non-systemd
machine.

Bug: https://bugs.gentoo.org/908254
Signed-off-by: Sam James <sam@gentoo.org>
2024-01-08 01:23:55 +00:00
Alexander Volkov 62fec48a6b dpms: Add support for DPMSInfoNotify event from DPMS 1.2 (xorgproto)
This allows applications to respond to changes of power level
of a monitor, e.g. an application may stop rendering and related
calculations when the monitor is off.

Related bug: https://bugs.freedesktop.org/57120

Signed-off-by: Alexander Volkov <avolkov@astralinux.ru>
2023-12-18 16:35:51 +03:00
Olivier Fourdan 411a61f571 build: Allow for custom server config directory
Most X servers, even those which do not have specific configuration
files, can use the directory specified by SERVER_MISC_CONFIG_PATH when
they have either the XSECURITY or XSELINUX extensions enabled, or when
support for DTRACE is enabled at build time, because this is also where
the "protocol.txt" file is searched for at runtime.

Unfortunately, the SERVER_MISC_CONFIG_PATH is set from serverconfigdir
which is hardcoded in the build system to "$prefix/$libdir/xorg", and
all X server builds share the same path.

That makes it harder for different X servers such as Xwayland to install
in the same path without sharing the same server configuration path
(and hence the same "protocol.txt" file).

Allow for the customization of server configuration path from the build
options so that different X servers can use completely different and
independent paths.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-11-21 11:49:44 +01:00
Sam James 94945a5274 Switch to libbsd-overlay
This is more portable than libbsd as everything Just Works, even on BSD systems,
and is the recommended method of consuming libbsd nowadays.

It also helpfully lets things work with glibc-provided functions for new
enough glibc.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/973
Co-authored-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Sam James <sam@gentoo.org>
2023-08-16 19:56:50 +00:00
Peter Hutterer a133334270 xwayland: Add XTEST support using EIS
This adds support for XTEST in Xwayland using EIS, the emulated input
library [1].

To differentiate between X11 clients using XTEST, initiate a EI context
for each client and use the actual client name, from its command
line.

When an X11 client first tries to use XTEST to generate emulated input
events, a new connection to libEI is initiated by Xwayland on behalf
of the X11 client.

During that connection phase, the EI server will not be accepting
events until the emulated device is actually created, meaning that any
XTEST request from the X11 client will be discarded until the EI server
is willing to accept events.

To avoid that issue, add an event queue in Xwayland per X11 client that
will keep those requests, and dequeue them as soon as the EI server is
ready, i.e. once the EI device is added.

If the X11 client disconnects from the Xserver before the EI server is
ready, or if the connection is closed by the EI server, those events are
discarded and the queue cleared from any pending events.

For 10 minutes after the client disconnects, keep the internal struct
alive. If a client with the same commandline arguments connects again,
re-use the same struct. This means we are faster with the events the
second time around but it also allows the EIS server to pause individual
clients that keep sending intermittent events and disconnect immediately
(e.g. it'd be possible to pause xdtotool while an authentication prompt
is active).

[1] https://gitlab.freedesktop.org/libinput/libei

Thanks to Jan Beich <jbeich@FreeBSD.org> for fixing the build on BSD.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Co-authored-by: Olivier Fourdan <ofourdan@redhat.com>
Co-authored-by: David Redondo <kde@david-redondo.de>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2023-06-26 13:19:19 +02:00
Xaver Hugl 2adc5c45c1 present: add support for PresentOptionAsyncMayTear
Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2023-06-19 12:19:31 +02:00
Xaver Hugl 0cfe09c458 require wayland-protocols 1.30
This is needed for tearing-updates-v1

Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2023-06-19 12:19:23 +02:00
Austin Shafer 5a742ab876 Add libdrm 2.4.109 requirement
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2023-03-03 14:18:49 +00:00
Olivier Fourdan 2f8778ca68 xwayland: wl_pointer.axis_v120 is no longer optional
With Wayland 1.21 being our baseline, we do not need to compile
wl_pointer.axis_v120 conditionally.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2023-02-09 22:57:00 +00:00
Olivier Fourdan f99bd03165 build: Bump Wayland dependency to 1.21
Wayland 1.21 was released on June 30, 2022 and our CI already installs
Wayland 1.21 so let's just require the version we actually use in our
CI.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2023-02-09 22:57:00 +00:00
orbea d266274ca9 meson: wayland_client_dep is false when wayland is disabled
Signed-off-by: orbea <orbea@riseup.net>
2023-01-24 17:05:45 -08:00
Peter Hutterer 3a02f56b43 xwayland: hook up wl_pointer.axis_v120 events
For details on the protocol itself see the Wayland merge request:
https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/72

The v120 event has a value base of 120, so one wheel detent is 120, half a
wheel is 60, etc. This is the API Windows has been using since Vista but it
requires HW support from the device. Logitech mice and many Microsoft mice of
the last decade or so have support and it's enabled in the kernel since v5.0.

The new events replace wl_pointer.axis_discrete events, once you bind to
wl_pointer >= 8 you only get the v120 events. So backwards compatibility
is simple, we just multiply the discrete events if we get them and
treat everything as 120 event internally.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-01-18 13:33:54 +10:00