Commit Graph

18776 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult 67e468c8bd xace: typesafe hook function for XACE_SEND_ACCESS
The generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556>
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult 9524ffee89 xace: typesafe hook function for XACE_DEVICE_ACCESS
The generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556>
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult ae3c573337 xace: typesafe hook function for XACE_RESOURCE_ACCESS
The generic XaceHook() call isn't typesafe (und unnecessarily slow).
Better add an explicit function, just like we already have for others.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556>
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult 632a48a057 Xace: clean up XaceHookDispatch() declaration
Overloading real function name with macro makes it unnecessarily
complicated. Just rename the real function.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556>
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult 3e0a4ab712 Xace: unexport Xace functions
These aren't used by any drivers, so no need to keep them exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556>
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult 22a3014c50 Xace: dont install xace.h and xacestr.h anymore
These aren't used by any drivers, so no need to keep them installed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556>
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult 601fd0fd84 xfixes/xace: fix pointer type mismatch on XFixesSelectSelectionInput()
This could potentially be security related or crash the server:

XFixesSelectSelectionInput() calls the XACE_SELECTION_ACCESS hook with
wrong parameter type: XID instead of pointer to Selection struct.
It seems that it hadn't been kept up in XACE changed to polyinstantiation.

When XACE is used (eg. Security or SELinux extension enabled), this can
easily lead to memory corruptions at attacker-controlled locations, since
the client-given XID is interpreted as the memory location of Selection
structure.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1556>
2024-06-23 21:07:48 +00:00
Enrico Weigelt, metux IT consult 9c95347244 Xext: drop _PANORAMIX_SERVER
This used to be for panoramiXproto.h, but it doesn't look at it anymore,
so no need to keep it around.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1551>
2024-06-23 19:31:46 +00:00
Enrico Weigelt, metux IT consult c77bcb9f7f Xext: securitysrv.h: drop hacks for including secur.h
The secur.h doesn't need the symbols defined here (eg. Status or Display)
anymore, so no need to keep it around anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1550>
2024-06-23 19:20:12 +00:00
Enrico Weigelt, metux IT consult 224fa46f26 include: dix.h: fix outdated comment
The comment about ClientPtr also being defined in misc.h is outdated
for about 20 years now: XFree86 4.3.0.1 dropped the redundant definition
over there.

It's still also in Xdefs.h, so the guard is still needed.

Fixes: d568221710
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1514>
2024-06-23 18:13:30 +00:00
Enrico Weigelt, metux IT consult 487eb46826 os: move xserver_poll.h into os/ directory
This header isn't public and holds defines for code in os/ directory,
so no need to keep it in the global header dir - it's probably better
off in os/ directory - just like we already have with many others.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1389>
2024-06-21 00:53:39 +00:00
Enrico Weigelt, metux IT consult 245f77cfdb mi: drop unused miPolyFillRect()
With removal of Xwin's NATIVEGDI (back a decade ago), the last caller is
gone, and it also doesn't seem to be called by any driver.

Fixes: 8465ee788f
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1504>
2024-06-21 00:24:56 +00:00
Enrico Weigelt, metux IT consult cdb4d5648a kbd: move _XkbWantsDetectableAutoRepeat() macro into dix/events.c
That's the only place where it is used, so no need to keep it
in a public header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1462>
2024-06-18 02:10:04 +00:00
Enrico Weigelt, metux IT consult f8057261fe os: drop extra ifdefs for AF_INET6
Since IPv6 is now only defined if IPv6 is really supported, we don't
need to ifdef on AF_INET6 anymore.

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 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 88b2257cc4 os: drop duplicate nested ifdef TCPCONN
This #ifdef is always true, since two lines above it's already
checked that TCPCONN is defined.

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 9d6a1d1118 os: access.c: drop unnecessary ifdef
Conditional on ipv6 around including <arpa/inet.h> isn't necessary.
The only reason target not having it is win32, but it doesn't enable
SIOCGLIFCONF anyways.

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
Enrico Weigelt, metux IT consult 4a27ff7a1a dix: drop unused args from CreateRootCursor()
The args have become dummies almost two decades ago, so no need
to keep them any longer.

Fixes: 0afeb0241a
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1522>
2024-06-18 01:33:56 +00:00
Enrico Weigelt, metux IT consult 27babe0334 mi: move *_VISUALS defines into consumer source file
These are only needed inside one .c source, so no need to keep thm exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1498>
2024-06-18 01:22:52 +00:00
Enrico Weigelt, metux IT consult 98104c969d mi: drop unused SWAPPT() macro
Leftover of dropping mfb about 1.5 decades ago.

Fixes: f31bd087e8
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1499>
2024-06-18 01:12:42 +00:00
Enrico Weigelt, metux IT consult 62a0a58717 mi: drop unused XMAJOROCTANTS
It hasn't been used for really long time, the history even doesn't
tell whether it ever had been used.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1500>
2024-06-18 01:02:26 +00:00
Enrico Weigelt, metux IT consult 71b207a2eb os: drop SUN-DES-1 authentication
DES isn't considered secure anymore for long time now, more and more platforms
dropping DES from their RPC implementations, and even the one where it came
from (Solaris) disabled it for a decade now. We have much better alternatives
(eg. passing creds via Unix socket for local connections, ssh tunneling,
MIT-MAGIC-COOKIE-1, ...), so it's unlikely anybody still really relying on it.

Therefore, sweep it out.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1453>
2024-06-18 00:52:11 +00:00
Enrico Weigelt, metux IT consult 229a6953ad xfree86: x86emu: rename segment register fields
Instead of keeping lots of special hacks for Solaris, just rename the
field of struct i386_segment_regs, so we don't need special care anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1548>
2024-06-18 00:41:38 +00:00
Enrico Weigelt, metux IT consult 0a0731721f xfree86: common: include math.h unconditionally
The header exists on all supported platform, maybe some might still need
to define _XOPEN_SOURCE to get pow() defined.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1548>
2024-06-18 00:41:38 +00:00
Enrico Weigelt, metux IT consult fd6fe36622 xfree86: os-support: simplify pci init
All supported platforms, except Linux, have have to call xf86InitVidMem()
from xf86scanpci(), so we can make the code much simpler.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1548>
2024-06-18 00:41:38 +00:00
Enrico Weigelt, metux IT consult 1b49f6ddb8 kdrive: drop Solaris specific hack
Since kdrive is only working on Unix'es, we don't need to care whether
that file might not exist on Windows, neither any need for doing so
exlusively on Solaris.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1548>
2024-06-18 00:41:38 +00:00
Enrico Weigelt, metux IT consult 83c94b7345 record: clean up Sun/Solaris specific hack
Instead of selectively undefining individual symbols with platform
specific hacks, just rename the enum values.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1548>
2024-06-18 00:41:38 +00:00
Peter Hutterer baef637747 CI: include ci-templates only once
No functional change here.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1568>
2024-06-18 00:30:58 +00:00
Olivier Fourdan 32e16082c5 xwayland: Stop on first unmapped child
If a child window of the same size is unmapped, we should stop walking
the tree looking for the surface window to use.

Whatever lies beneath is not visible anyway.

This also fixes an issue with the Damage list becoming corrupted when
destroying a window, because the first thing that DeleteWindow() does
is to unmap the window and crush the window tree underneath it.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Fixes: 3a0fc268 - xwayland: Add xwl_window::surface_window
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1680
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1564>
2024-06-17 07:06:38 +00:00
Olivier Fourdan 0509b13fa2 xwayland: Do not use manual redirect windows as surface window
While walking the window tree looking for the surface window to use, we
should ignore windows using manual redirection.

If a client manually redirects a window, it has control over how the
contents of that window are presented. It's not safe to present them
directly to the Wayland compositor.

v2: break instead of continue, reword commit message (Michel)

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Fixes: 3a0fc268 - xwayland: Add xwl_window::surface_window
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1677
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1679
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1564>
2024-06-17 07:06:38 +00:00
Chenx Dust 7605833315 xwayland: fix segment fault in `xwl_glamor_gbm_init_main_dev`
Function `xwl_glamor_gbm_init_main_dev` does not check whether
`xwl_screen->default_feedback.main_dev` a.k.a. `main_dev` is a
valid pointer. This result in some special situation where main
linux-dmabuf device is not accessible, such as KWin nested desktop,
raising segment fault.

This commit add a null pointer check to prevent crashing.

Signed-off-by: Chenx Dust <chenx_dust@outlook.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1683
Fixes: d7f1909e - xwayland/glamor/gbm: make wl_drm optional
See-also: https://bugzilla.redhat.com/2284141
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1565>
2024-06-14 09:53:12 +00:00
Fotios Valasiadis af6180b2c9 os: Explicitly include X11/Xmd.h for CARD32 definition to fix building on i686
Noticed this after trying to update to xorg-server-xwayland-24.1.0 in void linux https://github.com/void-linux/void-packages/pull/50457

Signed-off-by: Fotios Valasiadis <fvalasiad@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1561>
2024-06-07 08:42:58 +00:00
Rouven Czerwinski b9754729e1 xwayland: install pkgconfig to sharedir
Remove the previous change which ensured that the xwayland pkgconfig
file was installed into $libdir. This is a breaking change for build
systems searching for the xwayland pkg-config file. The sharedir
location fits xwayland better since the pkg-config file does not contain
linking information, it only contains the data on how to locate the
xwayland binary and which features are enabled.

Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1543>
2024-05-31 11:55:12 +00:00
Rouven Czerwinski 9df084c8d1 xwayland: remove includedir from pkgconfig
Before this change, the xwayland pkgconfig file will always contain an
includedir directive, even though xwayland is not a linkable shared
library:

  prefix=/nix/store/3spcjqp5zcyg8arz6dnsj59fal5yk3jy-xwayland-23.2.6
  includedir=${prefix}/include

  exec_prefix=${prefix}
  xwayland=/nix/store/3spcjqp5zcyg8arz6dnsj59fal5yk3jy-xwayland-23.2.6/bin/Xwayland
  […]
  Cflags: -I${includedir}

According to a bug reporter this trips up cmake [1], which expects that
the include directory exists, which it does not since xwayland does not
install any header files.

Add the dataonly directive to pkgsconfig.generate() which will remove
the default "." subdir and ensures that includedir is not set inside the
pkgconfig file. Additionally enforce the install directory to
$libdir/pkgconfig, since it otherwise will be installed to
$datadir/pkgconfig, which precludes programs from finding the pkgconfig
because share/pkgconfig is usually not included in the search path.

The resulting pkgconfig does not contain an includedir:

  prefix=/nix/store/p7xhdzl65hfhzf36vxykzp2i9cyy7y6c-xwayland-23.2.6

  exec_prefix=${prefix}
  xwayland=/nix/store/p7xhdzl65hfhzf36vxykzp2i9cyy7y6c-xwayland-23.2.6/bin/Xwayland
  have_glamor=true
  have_eglstream=true
  have_initfd=true
  have_listenfd=true
  have_verbose=true
  have_terminate_delay=true
  have_no_touch_pointer_emulation=true
  have_force_xrandr_emulation=true
  have_geometry=true
  have_fullscreen=true
  have_host_grab=true
  have_decorate=false
  have_enable_ei_portal=true
  have_byteswappedclients=true

  Name: Xwayland
  Description: X Server for Wayland
  Version: 23.2.6

[1]: https://github.com/NixOS/nixpkgs/pull/309075#issuecomment-2108381428

Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1543>
2024-05-31 11:55:12 +00:00
Matthieu Herrb 89c3f35d92 present: On *BSD, epoll-shim is needed to emulate eventfd()
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1559>
2024-05-22 09:00:11 +00:00
Yusuf Khan c5d152c176 modesetting/dri2: Remove always true ifdef
GLAMOR_HAS_GBM is ifdefed through the whole file, so checking for it
again is redundant.

Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1554>
2024-05-22 05:34:30 +00:00
Dr. David Alan Gilbert d94bff7880 xkb: deadcode cleanup
The last use of struct '_SrvXkmInfo' was removed in
commit fbd7768946 ("XKB: Ditch XkbFileInfo").
Remove it.

The define MAX_TOC hasn't been used in this file since sometime
in the mid 90's; it's unused in version '1997/05/20 11:42:06'
but in '1.8 94/05/16 10:49:53' it's used in the definition
of _SrvXkmInfo.
Remove it.

Build tested.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1558>
2024-05-19 16:15:43 +01:00
Michael Dluhosch e61bd1e5fd xkb: Replaced hardcoded values with compile time options
The core keyboard before this change always used a layout of "us" even if you
configured the build with another default layout.

Signed-off-by: Michael Dluhosch <michael.dluhosch@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1549>
2024-05-15 19:37:19 +02:00
Alan Coopersmith 7e119c5114 solaris: convert APM interfaces to official SRN interfaces
The sun_apm.c support was written to a draft version of the interfaces that
were integrated under a different name (SRN - Suspend/Resume Notification)
in 2007 for OpenSolaris, and what eventually became Solaris 11.0. Adopt the
official names and use the system-provided header file for these now.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1540>
2024-05-14 04:12:44 +00:00
Enrico Weigelt, metux IT consult fec061fc21 xkb: unexport Xkb* defines used by xkbtext.c
These are only used inside xkb/*, so no need to keep them exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1475>
2024-05-14 03:57:45 +00:00
Enrico Weigelt, metux IT consult 434044cb08 xkb: unexport functions from xkbtext.c
These are only used inside xkb/*, 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/1475>
2024-05-14 03:57:45 +00:00
Alan Coopersmith a4d298d855 xf86_OSlib.h: Don't need to include Solaris keyboard headers here
Left over from the builtin keyboard driver removed from the Xorg
server in 2006 (commit 3eeb62e8f5).

Requires xorg/driver/xf86-input-keyboard@40ef7d9e24987eb6708d822d0ea070
to build the current keyboard driver with this change.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1541>
2024-05-13 23:14:48 +00:00
Enrico Weigelt, metux IT consult 61d0c8e21c os: drop duplicate include of misc.h
Need to include it only once.

Fixes: be4c8444eb
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1542>
2024-05-13 19:23:08 +00:00
Enrico Weigelt, metux IT consult a4cb4bc4f8 os: drop remains of STREAMSCONN
STREAMSCONN has been removed about a decade ago, but some comments
have been forgotten to be cleaned.

Fixes: b3e9c534e2
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1538>
2024-05-13 18:20:55 +02:00
Olivier Fourdan 702a419c39 xwayland: Move XRandR emulation to the ResizeWindow hook
This restores the handling of the XRandR emulation for Xwayland rootless
where it was before commit fa7b1c20.

Some compositors may trigger a protocol error if the viewport source is
larger than the actual window size, having that handled in the window
resize hook makes sure we do not regress.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1521>
2024-05-13 08:52:32 +00:00
Olivier Fourdan 31d6f9998d xwayland: Handle rootful resize in ResizeWindow
Commit fa7b1c20 ("xwayland: Use ConfigNotify screen hook instead of
ResizeWindow") replaced the WindowResize hook with ConfigNotify.

However, that's breaking rootful Xwayland with libdecor because the root
window size is already set so the libdecor size is not updated, and the
root size will be reverted back as soon as the focus changes.

Reinstate the rootful size change in ResizeWindow to avoid that issue.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1669
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1671
Fixes: fa7b1c20 - xwayland: Use ConfigNotify screen hook instead of ResizeWindow
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1521>
2024-05-13 08:52:32 +00:00
Olivier Fourdan 539859bde0 xwayland: Restore the ResizeWindow handler
For now it just chains to ResizeWindow hook.

This is preparation work for the next commit, no functional change.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1521>
2024-05-13 08:52:32 +00:00
Joshua Ashton 7745fde24e xwayland: Send ei_device_frame on device_scroll_discrete
This fixes the scroll action in Steam Input in SteamOS/Gamescope when using the new libeis backend.

Fixes: a133334270 ("xwayland: Add XTEST support using EIS")
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1531>
2024-05-11 07:25:48 +01:00