Commit Graph

18716 Commits

Author SHA1 Message Date
Vlad Zahorodnii a4ed100c0c xwayland: Set wl_surface input region
Some applications that use client side decorations usually set custom
input shape in order to prevent drop shadows stealing pointer events
from windows below. Currently, the only way to get it is to use some
XFixes APIs.

On the other hand, plenty of wayland compositors use solely the
wl_surface input region to decide what view can receive pointer input,
which results in some pointer input issues around client side drop
shadows because Xwayland doesn't set wl_surface.input_region.

See-also: https://bugs.kde.org/show_bug.cgi?id=448119
Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1510>
2024-04-30 12:46:49 +00:00
Olivier Fourdan 4053782443 xwayland: Do not remove output on withdraw if leased
On DRM lease connector withdrawn event, Xwayland would free the
corresponding xwl_output offered for lease.

However, the pointer is still referenced from the rrLease->outputs[],
meaning that trying to clean up the RANDR DRM leases as done with commit
ef181265 (xwayland: Clean up drm lease when terminating) would cause a
use after free and random crashes.

To avoid that issue, on the connector withdraw event, set the connector
withdrawn flag but do not to remove (i.e. free) the xwayland output if
its is offered for lease.

Then, once the lease is terminated, check for the xwl_outputs with a
withdrawn connector and remove them (once we have no use for them
anymore.

Note that we cannot do that cleanup from xwl_randr_terminate_lease() as
removing the xwl_output will free the RRcrtc resources, which checks for
leases in XRANDR, and calls RRTerminateLease(), which chains back to
xwl_randr_terminate_lease().

v2: Use a "withdrawn_connector" flag to mark outputs to remove (Xaver)

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Xaver Hugl <xaver.hugl@kde.org>
fixes: ef181265 - xwayland: Clean up drm lease when terminating

See-also: https://gitlab.freedesktop.org/xorg/xserver/-/issues/946
See-also: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1130
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1482>
2024-04-30 09:13:34 +02:00
Olivier Fourdan 21916ae148 xwayland: Check for outputs before lease devices
In xwl_randr_request_lease(), the code checks first for leased device,
and then checks for existing output for lease.

The former assumes there are outputs for lease whereas the latter checks
for the output, connector and lease.

So if there is any existing rrLease->outputs[]->devPrivate unset, the
code would crash on a NULL pointer dereference on the first sanity check
before having a chance to reach the second check that would have caught
the problem.

Invert the sanity checks so that we would catch this first and return a
BadValue instead of possibly segfaulting.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Xaver Hugl <xaver.hugl@kde.org>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1482>
2024-04-30 09:13:34 +02:00
Enrico Weigelt, metux IT consult eff7ccc11c include: move private definitions out of exevents.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to private header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
2024-04-30 00:47:38 +00:00
Enrico Weigelt, metux IT consult 33350ef8ff include: move private definitions out of extinit.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to extinit_priv.h.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
2024-04-30 00:47:38 +00:00
Enrico Weigelt, metux IT consult bae6cbc8ca include: move private defs to dixstruct_priv.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to dixstruct_priv.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
2024-04-30 00:47:38 +00:00
Enrico Weigelt, metux IT consult f17bc7e24d include: split out non-exported prototypes to dix_priv.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to dix-intern.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
2024-04-30 00:47:38 +00:00
Enrico Weigelt, metux IT consult 8a2590e5d3 xkb: make XkbInternAtom() static
It's only used in the same .c file, so make it static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1506>
2024-04-28 23:21:52 +00:00
Michel Dänzer 08113b8923 xwayland/glamor: Handle depth 15 in gbm_format_for_depth
Prevents Xwayland with glamor from logging

 unexpected depth: 15

to stderr many times when running

 rendercheck -t blend -o clear

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1507>
2024-04-25 17:17:55 +02:00
Olivier Fourdan 49b8f131f7 xwayland: Use the connector name for XRANDR leases
Use the connector name as basis for the Xwayland output name in XRANDR,
similar to what we do for regular outputs, instead of the generic
"XWAYLAND<n>" name which changes every time the output is leased.

Prefix the actual name with "lease-" to distinguish from duplicate names
from the regular outputs.

v2: avoid duplicate names (Simon)
v3: Move the check for duplicates to xwl_output_set_name() (Simon)

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1492>
2024-04-23 11:14:31 +02:00
Olivier Fourdan d36f66f15d xwayland: Check for duplicate output names
Even though the name provided by either xdg-output or wl_output are
guaranteed to be unique, that might not be the case with output names
between different protocols, such as the one offered for DRM lease.

To avoid running into name conflicts, check that no other existing
output of the same name exists prior to changing the output name.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1492>
2024-04-23 11:14:31 +02:00
Olivier Fourdan 0cb4ec4dbd xwayland: Make xwl_output_set_name() public
No functional change, this is preparation work for the next commit.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1492>
2024-04-23 11:14:31 +02:00
Olivier Fourdan 12265aaa1c xwayland: Define MAX_OUTPUT_NAME in the header
So that other parts of the Xwayland code can use it.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1492>
2024-04-23 11:14:31 +02:00
Enrico Weigelt, metux IT consult 75cf29fe6c dbe: unexport dbestruct.h
This include isn't used by any (known) driver nor included by any other
public header, so no need to keep it in the public module API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1422>
2024-04-23 02:18:02 +00:00
Enrico Weigelt, metux IT consult feb5c785fc xkb: move *_TIMER defines into xkbAccessX.c
These are only used in this file (and also not any external driver),
so no need to have them in a public header file.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1459>
2024-04-23 02:01:17 +00:00
Enrico Weigelt, metux IT consult 8982344e53 include: move dbus-core.h to config
This header is internal (not installed) and holds definitions for sources
in config/, thus it fells more clean moving it to config/, too.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1357>
2024-04-23 01:46:24 +00:00
Enrico Weigelt, metux IT consult 140b75298a include: colormap.h: move internal typedef to dix/colormap_priv.h
Moving the internal EntryType typedef from "colormap.h" into newly added
internal-only header "dix/colormap_priv.h"

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1283>
2024-04-23 01:05:06 +00:00
Enrico Weigelt, metux IT consult 94451181c2 xnest: fix segfault in miCreateScreenResources()
With aa3f5023e3, pScreen->devPrivate now is
initialized only once, which uncovered a silent bug in xnestOpenScreen:
It's NULL'ing the pScreen->devPrivate pointer which already had been
initialized by previous miScreenDevPrivateInit() call.

Fixes: aa3f5023e3
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1495>
2024-04-23 00:52:52 +00:00
Enrico Weigelt, metux IT consult 86d0f6dafa include: drop obsolete check for typeof operator
It really seems that compilers on all our supported platforms
(including Solaris) supporting `typeof`, so we can always use it
and drop hacks with undefind behaviour entirely.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1432>
2024-04-22 22:15:45 +00:00
Enrico Weigelt, metux IT consult 17db4ba3de xfree86: sdksyms: drop errornous check for mifillarc.h
This file had been dropped from public API a decade ago, but sdksyms.sh
yet had been forgotten to be fixed.

Fixes: 707965407a
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1497>
2024-04-22 20:43:38 +02:00
Enrico Weigelt, metux IT consult 43f47e8e65 xfree86: x86emu: fix warning on unneccessary abs()
fix warning:

> In file included from ../hw/xfree86/int10/x86emu.c:11:
> ../hw/xfree86/x86emu/prim_ops.c:2478:9: warning: taking the absolute value of unsigned type 'x86emuu32' (aka 'unsigned int') has no effect [-Wabsolute-value]
>     if (abs(div) > 0xff) {
>         ^
> ../hw/xfree86/x86emu/prim_ops.c:2478:9: note: remove the call to 'abs' since unsigned values cannot be negative
>     if (abs(div) > 0xff) {
>         ^~~
> ../hw/xfree86/x86emu/prim_ops.c:2502:9: warning: taking the absolute value of unsigned type 'x86emuu32' (aka 'unsigned int') has no effect [-Wabsolute-value]
>     if (abs(div) > 0xffff) {
>         ^
> ../hw/xfree86/x86emu/prim_ops.c:2502:9: note: remove the call to 'abs' since unsigned values cannot be negative
>     if (abs(div) > 0xffff) {
>         ^~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1428>
2024-04-18 01:03:11 +00:00
Enrico Weigelt, metux IT consult a0daa6f1fe xfree86: x86emu: drop unused stq_u()
fix warning on unused function:

> ../hw/xfree86/x86emu/sys.c:87:1: warning: unused function 'stq_u' [-Wunused-function]
> stq_u(u64 val, u64 * p)
> ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1428>
2024-04-18 01:03:11 +00:00
Enrico Weigelt, metux IT consult 8081fe1206 xfree86: x86emu: drop unused ldq_u()
fix warning on unused function:

> ../hw/xfree86/x86emu/sys.c:69:1: warning: unused function 'ldq_u' [-Wunused-function]
> ldq_u(u64 * p)
> ^
> ../hw/xfree86/x86emu/sys.c:95:1: warning: unused function 'stq_u' [-Wunused-function]
> stq_u(u64 val, u64 * p)
> ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1428>
2024-04-18 01:03:11 +00:00
Enrico Weigelt, metux IT consult 1e7085d143 xfree86: os-support: bsd: fix missing prototypes
Fix warnings on missing prototypes:

> ../hw/xfree86/os-support/bsd/bsd_VTsw.c:56:20: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> xf86VTSwitchPending()
>                    ^
>                     void
> ../hw/xfree86/os-support/bsd/bsd_VTsw.c:67:17: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> xf86VTSwitchAway()
>                 ^
>                  void
> ../hw/xfree86/os-support/bsd/bsd_VTsw.c:82:15: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> xf86VTSwitchTo()
>               ^
>                void

> ../hw/xfree86/os-support/bsd/bsd_init.c:155:16: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> xf86OpenConsole()
>                ^
>                 void
> ../hw/xfree86/os-support/bsd/bsd_init.c:322:15: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> xf86OpenPccons()
>               ^
>                void
> ../hw/xfree86/os-support/bsd/bsd_init.c:347:16: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> xf86OpenSyscons()
>                ^
>                 void
> ../hw/xfree86/os-support/bsd/bsd_init.c:453:13: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> xf86OpenPcvt()
>             ^
>              void
> ../hw/xfree86/os-support/bsd/bsd_init.c:596:17: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> xf86CloseConsole()
>                 ^
>                  void
> ../hw/xfree86/os-support/bsd/bsd_init.c:673:11: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> xf86UseMsg()
>           ^
>            void

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1428>
2024-04-18 01:03:11 +00:00
Enrico Weigelt, metux IT consult 20d0545f0d xfree86: modes: drop unused xf86_driver_has_show_cursor()
Fix warning on unused function:

> ../hw/xfree86/modes/xf86Cursors.c:212:1: warning: unused function 'xf86_driver_has_show_cursor' [-Wunused-function]
> xf86_driver_has_show_cursor(xf86CrtcPtr crtc)
> ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1428>
2024-04-18 01:03:11 +00:00
Enrico Weigelt, metux IT consult a532c93206 composite: fix duplicate typedef of ScreenPtr
fix warning on duplicate typedef:

> ../composite/compositeext_priv.h:11:25: warning: redefinition of typedef 'ScreenPtr' is a C11 feature [-Wtypedef-redefinition]
> typedef struct _Screen *ScreenPtr;
>                         ^
> ../include/screenint.h:55:25: note: previous definition is here
> typedef struct _Screen *ScreenPtr;
>                         ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1430>
2024-04-18 00:51:06 +00:00
Enrico Weigelt, metux IT consult 0f715b4ca4 xfree86: os-support: move hidden Solaris-specific symbols out of public header
These aren't exported at all, so no need to have it in public header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
2024-04-18 00:40:39 +00:00
Enrico Weigelt, metux IT consult 7429f8ee8f xfree86: os-support: move xf86FatalError macro out of public header
This macro is only used inside xfree86's os-support layer, not by any
(known) drivers. Thus no need to have it exported in the public API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
2024-04-18 00:40:39 +00:00
Enrico Weigelt, metux IT consult 16a3790d60 xfree86: os-support: move unexported stuff out of xf86_OSproc.h
It's cleaner to have public headers only holding public stuff and
xf86_os_support seems to be much more appropriate place for this.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
2024-04-18 00:40:39 +00:00
Enrico Weigelt, metux IT consult 5b23578f93 xfree86: os-support: move VidMemInfo xf86_os_support.h
This type is only used inside the os-support layer of xfree86, so it fits
better into xf86_os_support.h, whose purpose is being the primary entry
point into os-support layer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
2024-04-18 00:40:39 +00:00
Enrico Weigelt, metux IT consult 533c45e595 xfree86: os-support: move xf86OSInitVidMem() to xf86_os_support.h
This function isn't exported at all, so it better fits into xf86_os_support.h,
whose purpose is being the primary entry point into os-support layer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
2024-04-18 00:40:39 +00:00
Enrico Weigelt, metux IT consult a5cfe020f5 xfree86: os-support: unexport xf86RemoveSIGIOHandler
It's not used by any driver, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
2024-04-18 00:40:39 +00:00
Enrico Weigelt, metux IT consult 3e4fc3e588 xfree86: os-support: unexport xf86DeallocateGARTMemory
It's not used in any drivers, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
2024-04-18 00:40:39 +00:00
Enrico Weigelt, metux IT consult 38030fce53 xfree86: os-support: unexport xf86OSInputThreadInit()
This is just called by xfree86 core, not by any drivers, thus no need
to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
2024-04-18 00:40:39 +00:00
Enrico Weigelt, metux IT consult b9569f1eb3 xfree86: os-support: unexport xf86OSRingBell()
This function is only internal to xfree86 DDX, not used by any drivers,
thus no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
2024-04-18 00:40:39 +00:00
Enrico Weigelt, metux IT consult 7aa3fa54d4 xfree86: unexport os-support functions
These aren't called by drivers/modules, so no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1456>
2024-04-18 00:40:39 +00:00
Enrico Weigelt, metux IT consult e2fa0d2ae0 fix including <sys/mman.h>
Make sure everybody who needs stuff from <sys/mman.h> actually includes it,
and dropped the include from xf86_OSlib.h.

Check for all symbols defined by Open Group spec.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1412>
2024-04-18 00:12:02 +00:00
Enrico Weigelt, metux IT consult 8ce76acddf xfree86: os-support: bsd fix warning on unused label on NetBSD
The label is only used on FreeBSD, so compiling on NetBSD gives a
warning on unused label.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1447>
2024-04-18 00:01:27 +00:00
Enrico Weigelt, metux IT consult 6eea4f0b8c xfree86: os-support: bsd: fix warning on discarded const
Fix warnings:

../hw/xfree86/os-support/bsd/bsd_init.c
../hw/xfree86/os-support/bsd/bsd_init.c:91:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   91 |     "pccons (with X support)",
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
../hw/xfree86/os-support/bsd/bsd_init.c:97:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   97 |     "pcvt",
      |     ^~~~~~
../hw/xfree86/os-support/bsd/bsd_init.c💯5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  100 |     "wscons",
      |     ^~~~~~~~

../hw/xfree86/os-support/bsd/bsd_init.c:462:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  462 |     vtprefix = "/dev/ttyv";
      |              ^
../hw/xfree86/os-support/bsd/bsd_init.c:471:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  471 |         vtprefix = "/dev/ttyE";
      |                  ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1446>
2024-04-17 23:50:09 +00:00
Enrico Weigelt, metux IT consult 620b678cfe os: secure-rpc: make build option tristate
Add support `auto` mode, which only enables secure-rpc when
dependencies are met.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1441>
2024-04-17 23:38:25 +00:00
Enrico Weigelt, metux IT consult 339717bac6 os: secure-rpc: check struct authdes_cred
Some platforms (eg. NetBSD) don't have DES support in rpc anymore, so we
should check, in order to prevent weird, hard to understand build breaks.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1441>
2024-04-17 23:38:25 +00:00
Enrico Weigelt, metux IT consult d2d3f4a700 os: define SECURE_RPC locally instead of global config header
Since this define is only used inside os subdir, move the definition there
and out of the global config header. This also makes some further steps,
e.g. checking whether it's supported, a litle bit easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1441>
2024-04-17 23:38:25 +00:00
Enrico Weigelt, metux IT consult c17c527b9a os: unexport ForceClockId()
This function is only intended for DDX'es (currently just Xwayland) that
need to force using another clock. Really shouldn't be called by drivers
or extensions.

Fixes: a779fda224
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1333>
2024-04-17 16:20:54 -07:00
Olivier Fourdan 41c3155fdf xwayland: Use exec name instead of hardcoding '/Xwayland'
Use the target name instead of hardcoding the 'Xwayland' executable
name, along with the / operator.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1490>
2024-04-17 15:20:05 +00:00
Olivier Fourdan 8ff88ffec9 xwayland: Use the path to Xwayland as installed
Otherwise the executable cannot be found where specified.

v2: Use 'xwayland_path' (Simon)

Fixes: fbf5e26b5 - 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/1490>
2024-04-17 15:20:05 +00:00
Simon Ser d1fe52933e xwayland: use array for protocol XML files
Saves us the repetition.

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1491>
2024-04-17 15:25:34 +02:00
Enrico Weigelt, metux IT consult 5057c716eb Fix missing include of sys/stat.h
Instead of relying on very indirect includes, it's more more clean when
everybody explicitly includes what he really needs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1417>
2024-04-17 10:55:10 +02:00
Enrico Weigelt, metux IT consult 97e26532d5 xfree86: os-support: drop ununsed POSIX_TTY
Found no evidence that this define is practically used anywhere, aymore.
Web research just showed up a single ancient .c file (looks like an
Wacom driver) from 1998. Xserver's git history doesn't tell when it
actually had been introduced.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1408>
2024-04-17 02:16:12 +00:00
Enrico Weigelt, metux IT consult a1c1f8b9d8 xfree86: drop unused xf86EnableAGP()
This function doesn't seem to be used anymore, neither inside the xserver,
nor by any drivers - so it can be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1404>
2024-04-17 02:05:36 +00:00
Enrico Weigelt, metux IT consult ba870af892 xfree86: drop unused xf86SetReallySlowBcopy()
This had been introduced almost two decades ago, by Dave Airlie (*1) along
with some major IO speed improvement, just in case some driver still needed
the old behaviour - in that case it would call xf86SetReallySlowBcopy(),
so xf86SlowBcopy() would fall back to the old approach emitting an extra
outb() on debug port, in order to slow things down more.

Now aeons have passed and there doesn't seem to be any actual user for this,
so it's time to drop that ancient relic.

*1) commit e717eb82dc

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1402>
2024-04-17 01:54:28 +00:00