Olivier Fourdan
2bdf594cea
xwayland: Track output scales
...
Keep track of the output scales as advertised by the wl_output 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
5b05a29912
xwayland: Use CRTC transforms
...
Advertise the scaling factor applied to the Xwayland output using the
mechanism of CRTC transforms.
That allows for X11 clients to query the scale factor using XRandR.
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
6a09cd2d20
xwayland: Introduce output scale
...
Add a scale factor to the Xwayland output and take the scale into
account when computing the screen size.
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
8c54f90673
xwayland: Store the mode width/height
...
The mode size can be different from the actual output size when a
transformation is at play.
Store the actual mode width/height as well in preparation for adding
support for transforms.
No functional change.
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
32dad24083
xwayland: Use double for screen size
...
Use double precision floating point for the screen size to reduce the
rounding issues when using fractional scaling.
Introduce a couple of simple convenient functions that round the
floating point value into an integer and use it in place of directly
accessing the xwl_screen width/height for integer computation.
This is preparation work for the introduction of fractional scaling,
there should be no functional change at this point.
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
Alan Coopersmith
e1c5be126b
bsd_init.c: fix build on FreeBSD
...
Commit 0d4a7ed6 put the definition of pcvt_version inside #ifdef __NetBSD__
but left one use of it outside of the ifdefs, resulting in a build failure
on FreeBSD 14.0 in the gitlab CI for xf86-input-keyboard.
../hw/xfree86/os-support/bsd/bsd_init.c:540:21:
error: use of undeclared identifier 'pcvt_version'
pcvt_version.rmajor, pcvt_version.rminor);
^
../hw/xfree86/os-support/bsd/bsd_init.c:540:42:
error: use of undeclared identifier 'pcvt_version'
pcvt_version.rmajor, pcvt_version.rminor);
^
Fixes: 0d4a7ed68 ("bsd_init.c: fix build on OpenBSD")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1424 >
2024-03-20 03:32:23 +00:00
Enrico Weigelt, metux IT consult
2003adfd33
xwin: consolidate debugging symbols
...
We've got three #define's that are all set at once, on enable_debugging.
A comment in meson.build already asks for consolidating them into one,
so just do it now.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1409 >
2024-03-19 02:05:35 +00:00
Enrico Weigelt, metux IT consult
d8758cdd20
xfree86: os-support: ppc_video: drop unused DEV_MEM define
...
This #define is local within a .c file, but became unused about a
decade ago (commit 8686463de7 ).
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1410 >
2024-03-19 01:59:38 +00:00
Enrico Weigelt, metux IT consult
0cb8a76a9f
xfree86: os-support: drop obsolete Solaris specific LED defines
...
Historical legacy: the LED ID defines have/had different naming across various
platforms - for better portability of the keyboard driver, those have been
aliased to BSD's naming scheme. Meanwhile, lots of ancient platforms have
been died or moved to other drivers (eg. Linux went to either evdev or libinput
and not supported by the xf86-input-keyboard driver anymore).
The only remaining possible consumer is Solaris. But it has it's own dedicated
code (sun_kbd.c in xf86-input-keyboard), which already using the Solaris' naming.
Therefore, there's no actual consumer of them left, so we can drop them.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1418 >
2024-03-19 00:54:38 +00:00
Peter Hutterer
052909ab9b
CI: Only run the driver build job on Xorg changes
...
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1318 >
2024-03-19 00:37:35 +00:00
Peter Hutterer
89b7f45010
CI: add a driver build stage to check for header breakage
...
Pull a few drivers and try to build their most recent release (or a
specific SHA) and see if they still build. If they do, yay, otherwise
fail.
Dependency-wise we need to keep libevdev-dev and libinput-dev around
now and add libspice-protocol-dev for the qxl driver.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1318 >
2024-03-19 00:37:35 +00:00
Peter Hutterer
924939c886
Revert "Fix missing includes of <errno.h>"
...
Removing errno from xf86_OSlib.h breaks the xf86-input-mouse driver
build. And xf86_OSlib.h itself relies on errno anyway in the SYSCALL
macro provided by this header.
This reverts commit f6a367102c .
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1423 >
2024-03-19 00:33:26 +00:00
Olivier Fourdan
792758faa5
xwayland: Update lost focus on deactivation
...
Use the "activated" state from xdg-shell to call the pointer and
keyboard leave events when running rootful.
The regular pointer and keyboard leave notifications are now ignored
when running rootful.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1604
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1213 >
2024-03-18 23:34:29 +00:00
Olivier Fourdan
122ad8a0de
xwayland: Introduce xwl_screen_lost_focus()
...
xwl_screen_lost_focus() calls the keyboard and pointer leave functions
for each seat.
No functional change.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1213 >
2024-03-18 23:34:29 +00:00
Olivier Fourdan
654c354da9
xwayland: Move the leave kbd/ptr code
...
Move part of the code that deals with pointer or keyboard leave
notifications to their own function.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1213 >
2024-03-18 23:34:29 +00:00
Enrico Weigelt, metux IT consult
afaad1b847
include: add comment on _XSERVER64 define
...
Since the whole 32/64 bit issue is a bit complex, it's worth adding some
comment on what the _XSERVER64 symbol really is needed for.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1413 >
2024-03-18 23:24:36 +00:00
Olivier Fourdan
9a7fb3a153
xwayland: Use "-decorate" if available
...
That allows to open new Xwayland decorated windows as needed (e.g. using
the "New window" entry from the launcher)
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1421 >
2024-03-18 23:19:59 +00:00
Olivier Fourdan
fbf5e26b5c
xwayland: Use full path for Xwayland exec
...
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1421 >
2024-03-18 23:19:59 +00:00
Olivier Fourdan
66b371f306
xwayland: Add the Exec key to the desktop file
...
This was intentionally left out, but it's against the spec.
Add an Exec key to be conformant.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1654
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1421 >
2024-03-18 23:19:59 +00:00
Enrico Weigelt, metux IT consult
ccfa7e9f2e
Fix missing include of <sys/wait.h>
...
Instead of relying on indirect includes, it's much cleaner if everybody
includes directly what he needs.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1419 >
2024-03-18 23:02:45 +00:00
Enrico Weigelt, metux IT consult
f6a367102c
Fix missing includes of <errno.h>
...
It's much cleaner to always include directly what one needs,
instead of relying on very indirect including.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1416 >
2024-03-18 22:58:32 +00:00
Olivier Fourdan
54a2dfc229
xwayland: Drop xwl_window_buffers_get_pixmap()
...
This just calls into xwl_window_swap_pixmap() so we can just use that
instead (Michel).
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386 >
2024-03-18 15:41:18 +00:00
Olivier Fourdan
656d2efd4b
xwayland/glamor: Drop xwl_glamor_needs_n_buffering()
...
This function always return TRUE now that EGLSTream is gone, so we can
remove it.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386 >
2024-03-18 15:41:18 +00:00
Olivier Fourdan
d422b40926
xwayland/glamor: Drop xwl_glamor_needs_buffer_flush()
...
GLAMOR needs that, and the function returns TRUE unless GLAMOR is not
used.
Drop the function xwl_glamor_needs_buffer_flush() and call
glamor_block_handler() when glamor is used.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386 >
2024-03-18 15:41:18 +00:00
Olivier Fourdan
6466c1ee81
xwayland/glamor: Drop xwl_screen_get_main_dev()
...
This is made redundant with xwl_gbm_get_main_device(), and this is not
really an xwl_screen function either.
Let's remove it.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386 >
2024-03-18 15:41:18 +00:00
Olivier Fourdan
ef29e05200
xwayland/glamor: Drop the backend_flags definition
...
Nobody uses that anymore.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386 >
2024-03-18 15:41:18 +00:00
Olivier Fourdan
888e3e7a94
xwayland/glamor: Remove the xwl_egl_backend structure
...
No more backend structure, one GBM backend to rule them all!
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386 >
2024-03-18 15:41:18 +00:00
Olivier Fourdan
8c0267b60f
xwayland/glamor: Drop init_backend() and select_backend()
...
Now that we have only one backend, there is no need to initialize or
select between different backends.
Drop the corresponding functions.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386 >
2024-03-18 15:41:18 +00:00
Olivier Fourdan
bceaca28d3
xwayland/glamor: Remove the backend pointers
...
We have only one backend now.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386 >
2024-03-18 15:41:18 +00:00
Olivier Fourdan
863ee2da4d
xwayland/glamor: Make xwl_glamor_has_wl_interfaces() private
...
It's not used outside of Xwayland GLAMOR code itself, no need to keep it
public.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386 >
2024-03-18 15:41:18 +00:00
Olivier Fourdan
4eb8684f52
xwayland/glamor: Drop the allow_commit() hook
...
That was used only by the EGLStream backend, we can remove it.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386 >
2024-03-18 15:41:18 +00:00
Olivier Fourdan
6fd77acd91
xwayland/glamor: Drop the post_damage() hook
...
That was used only with the EGLStream backend, we can remove it.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386 >
2024-03-18 15:41:18 +00:00
Olivier Fourdan
5fd0c92b0e
xwayland/glamor: Remove the flag "is_available"
...
Now that we have only one GBM backend, either it is available and
usable, or we cannot use GLAMOR.
Therefore we can drop the flag "is_available".
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386 >
2024-03-18 15:41:18 +00:00
Olivier Fourdan
5df6a1e969
xwayland/glamor: Make xwl_glamor_init_gbm() return its status
...
This is a preliminary step to remove the backend's field "is_available".
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
63e2f98f0a
xwayland/glamor: Drop the backend_flags
...
We do not need these anymore, since we only have the GBM backend left.
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
925a218b4b
xwayland/glamor: Drop the create_pixmap_for_window() hook
...
And rename the function xwl_glamor_gbm_create_pixmap_for_window() as
xwl_glamor_create_pixmap_for_window().
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
439c0ee5e4
xwayland/glamor: Drop the get_main_device() hook
...
Call xwl_gbm_get_main_device() directly from xwl_screen_get_main_dev().
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
e8d974a8d3
xwayland/glamor: Drop the check_flip() hook
...
The GBM backend never had a use for it.
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
76ae669327
xwayland/glamor: Drop the get_wl_buffer_for_pixmap() hook
...
And rename the GLAMOR GBM xwl_glamor_gbm_get_wl_buffer_for_pixmap()
function as xwl_glamor_pixmap_get_wl_buffer().
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
e60e00ff40
xwayland/glamor: Drop the init_screen() hook
...
And call xwl_glamor_gbm_init_screen() directly instead.
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
e1bec429bb
xwayland/glamor: Drop the init_egl() hook.
...
And call xwl_glamor_gbm_init_egl() directly instead.
Yet, keep the function separate rather than merging it back into
xwl_glamor_init() for clarity of the code.
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
ca73cd8a9d
xwayland/glamor: Drop xwl_glamor_gbm_has_wl_interfaces()
...
And merge it back into xwl_glamor_has_wl_interfaces()
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
2ccabf5aa8
xwayland/glamor: Drop xwl_glamor_gbm_init_wl_registry()
...
And merge it back into xwl_glamor_init_wl_registry().
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
673ed3cd6d
xwayland/glamor: Add a GLAMOR GBM header
...
That will be used between the generic Xwayland GLAMOR functions and the
GBM implementation.
Move the definition of xwl_glamor_init_gbm() to that new header rather
than in the generic Xwayland GLAMOR header.
This is preparation work to eventually replace the xwl_egl_backend now
that we have only one backend left.
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
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
Simon Ser
005912d82f
xwayland/glamor/gbm: simplify render node check
...
No need to call is_device_path_render_node() on each node, the
index is the node type. Saves a couple of open()/close()/IOCTLs.
Signed-off-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1237 >
2024-03-15 10:53:01 +00:00
Enrico Weigelt, metux IT consult
5b43fd8393
xfree86: os-support: drop unused xf86SerialSendBreak()
...
Since no evidency of anybody actually using it (nor it ever been used within
recorded git history), it's time to drop this old relic from times before
the great flood.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1403 >
2024-03-15 04:33:43 +00:00
Enrico Weigelt, metux IT consult
9bc7d96a45
xfree86: os-support: drop unused NO_OSLIB_PROTOTYPES guard
...
The last user was removed a decade ago by commit
a6fcb15472 .
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1407 >
2024-03-15 04:29:17 +00:00
Olivier Fourdan
722ea5d000
xwayland: Move dmabuf code to its own source file
...
The dmabuf support code is scattered across different source files,
making it hard to follow and bloating unrelated sources.
Move the dmabuf related source code to its own source files.
This is just a cleanup aimed at helping with code readability, no
functional change intended.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1111 >
2024-03-14 15:00:46 +01:00
Michel Dänzer
e1cb1b324e
ci: Make test stage jobs not depend on earlier stage jobs
...
There's no dependency, they can start anytime.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1406 >
2024-03-14 11:18:04 +00:00