Find a file
Olivier Fourdan fa70fdf961 xwayland: Report correct mode size when rootful
The vidmode extension emulation in Xwayland reports the modeline based
on the current mode.

To do so, it searches for the mode using `xwl_output_find_mode(-1, -1)`
which is supposed to return the current mode, whatever that mode is.

With XRandR emulation, in rootless mode, the default value is the mode
at index 0. That assumption, however is not true when running rootful.

That means that the vidmode extension will always return the highest
mode available, which is 5120x2880, with Xwayland running rootful:

  $ xwayland-run -geometry 1024x768 -- xvidtune -show
  "5120x2880"   1276.50   5120 5560 6128 7136   2880 2883 2888 2982 -hsync +vsync

Luckily, when Xwayland is running rootful, we have the current mode size
conveniently stored in dedicated fields of the xwayland output struct,
so we can use that to search for the right mode being used and report
that through the vidmode extension:

  $ xwayland-run -geometry 1024x768 -- xvidtune -show
  "1024x768"     63.50   1024 1064 1176 1328    768  771  775  798 -hsync +vsync

That fixes legacy games using the vidmode extension and rendering at the
wrong size when running within Xwayland rootful.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit e2e5842444)

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1702>
2024-09-24 10:47:47 +02:00
.gitlab-ci Drop Xorg DDX 2024-04-12 10:40:05 +02:00
composite Drop Xorg DDX 2024-04-12 10:40:05 +02:00
damageext Remove autotools support 2021-10-27 13:15:40 +03:00
dbe Drop Xorg DDX 2024-04-12 10:40:05 +02:00
dix Move sizeof to second argument in calloc calls 2024-08-06 10:00:59 +02:00
doc dix: dixutils: make workQueue pointer dix-private 2024-02-23 23:06:38 +00:00
dri3 Drop Xorg DDX 2024-04-12 10:40:05 +02:00
fb Drop Xorg DDX 2024-04-12 10:40:05 +02:00
glamor glamor: xv: Rewrite UYVY shader to match NV12/I420 CSC 2024-08-06 10:00:59 +02:00
glx Drop Xorg DDX 2024-04-12 10:40:05 +02:00
hw xwayland: Report correct mode size when rootful 2024-09-24 10:47:47 +02:00
include Drop config directory 2024-04-12 10:40:05 +02:00
man Drop Xorg DDX 2024-04-12 10:40:05 +02:00
mi Drop Xorg DDX 2024-04-12 10:40:05 +02:00
miext Drop miext/shadow directory 2024-04-12 10:40:05 +02:00
os os: Fix assignment with incompatible pointer type 2024-08-06 09:54:01 +02:00
present present: On *BSD, epoll-shim is needed to emulate eventfd() 2024-07-04 08:36:40 +00:00
randr Drop Xorg DDX 2024-04-12 10:40:05 +02:00
record dix: unexport eventconvert.h functions 2024-03-11 12:26:44 +01:00
render Drop Xorg DDX 2024-04-12 10:40:05 +02:00
test Drop Xephyr / kdrive DDX 2024-04-12 10:40:05 +02:00
Xext Drop Xorg DDX 2024-04-12 10:40:05 +02:00
xfixes Move sizeof to second argument in calloc calls 2024-08-06 10:00:59 +02:00
Xi Move sizeof to second argument in calloc calls 2024-08-06 10:00:59 +02:00
xkb xkb: drop ununsed XkbNameMatchesPattern() 2024-04-09 06:56:20 +00:00
.appveyor.yml Drop Xephyr / kdrive DDX 2024-04-12 10:40:05 +02:00
.dir-locals.el .dir-locals.el: Add missing final newline 2019-10-01 17:05:28 +00:00
.gitignore Clean up the .gitignore file 2024-01-12 00:50:24 +00:00
.gitlab-ci.yml meson: Change project name to xwayland 2024-04-12 10:40:05 +02:00
.mailmap Add a .mailmap file to canonicalize author names and emails 2023-03-15 18:10:51 +00:00
COPYING modesetting: Merge modesetting's COPYING into the xserver's. 2014-09-15 12:46:02 -07:00
meson.build Bump version to 24.1.2 2024-08-07 11:22:21 +02:00
meson_options.txt meson: Build Xwayland unconditionally 2024-04-12 10:40:05 +02:00
README.md Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
xserver.ent.in doc: relocate xserver.ent in the package root directory 2011-05-14 11:22:26 -07:00

X Server

The X server accepts requests from client applications to create windows, which are (normally rectangular) "virtual screens" that the client program can draw into.

Windows are then composed on the actual screen by the X server (or by a separate composite manager) as directed by the window manager, which usually communicates with the user via graphical controls such as buttons and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the following article: https://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the Xorg mailing list:

https://lists.freedesktop.org/mailman/listinfo/xorg

The primary development code repository can be found at:

https://gitlab.freedesktop.org/xorg/xserver

For patch submission instructions, see:

https://www.x.org/wiki/Development/Documentation/SubmittingPatches

As with other projects hosted on freedesktop.org, X.Org follows its Code of Conduct, based on the Contributor Covenant. Please conduct yourself in a respectful and civilized manner when using the above mailing lists, bug trackers, etc:

https://www.freedesktop.org/wiki/CodeOfConduct