XLibre Xserver
Go to file
Olivier Fourdan e2e5842444 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>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1641>
2024-08-13 10:08:19 +02:00
.gitlab-ci Update CI for Xwayland explicit sync 2024-04-09 06:11:03 +00:00
Xext xv: unexport XvPortNotifyRec 2024-07-26 23:51:13 +00:00
Xi treewide: replace xnfreallocarray macro call by XNFreallocarray() 2024-07-26 23:41:33 +00:00
composite dix: unexport fields from opaque.h not used by modules/drivers 2024-06-23 21:19:27 +00:00
config treewide: replace xnfcalloc() calls by XNFcallocarray() 2024-07-26 23:41:33 +00:00
damageext include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
dbe xace: typesafe hook function for XACE_SCREEN_ACCESS 2024-06-23 21:07:48 +00:00
dix treewide: replace xnfrealloc() calls to XNFrealloc() 2024-07-26 23:41:33 +00:00
doc prevent name clash on Windows w/ RT_* defines 2024-04-15 18:59:23 -07:00
dri3 treewide: replace xnfalloc() calls to XNFalloc() 2024-07-26 23:41:33 +00:00
exa Move sizeof to second argument in calloc calls 2024-07-19 23:45:21 +00:00
fb render: move private definitions out of public glyphstr.h 2024-03-03 22:54:16 +00:00
glamor glamor: xv: Rewrite UYVY shader to match NV12/I420 CSC 2024-08-01 10:51:20 +03:00
glx treewide: replace xnfstrdup() calls by XNFstrdup() 2024-07-26 23:41:34 +00:00
hw xwayland: Report correct mode size when rootful 2024-08-13 10:08:19 +02:00
include treewide: replace xnfreallocarray macro call by XNFreallocarray() 2024-07-26 23:41:33 +00:00
man Xserver.man: Note that -byteswappedclients is the default in this release 2024-03-23 10:27:03 -07:00
mi treewide: replace xnfalloc() calls to XNFalloc() 2024-07-26 23:41:33 +00:00
miext os: unexport Os*() functions 2024-04-16 14:20:30 +02:00
os xv: move noXvExtension to xvmain.c 2024-07-26 23:51:13 +00:00
present present: On *BSD, epoll-shim is needed to emulate eventfd() 2024-05-22 09:00:11 +00:00
pseudoramiX fix missing includes of <X11/Xfuncproto.h> 2024-07-20 17:18:38 +00:00
randr dix: unexport fields from opaque.h not used by modules/drivers 2024-06-23 21:19:27 +00:00
record record: clean up Sun/Solaris specific hack 2024-06-18 00:41:38 +00:00
render xace: typesafe hook function for XACE_RESOURCE_ACCESS 2024-06-23 21:07:48 +00:00
test treewide: replace xnfstrdup() calls by XNFstrdup() 2024-07-26 23:41:34 +00:00
xfixes Move sizeof to second argument in calloc calls 2024-07-19 23:45:21 +00:00
xkb treewide: replace xnfstrdup() calls by XNFstrdup() 2024-07-26 23:41:34 +00:00
.appveyor.yml appveyor: Add libxcvt build dep 2021-11-04 13:03:25 +00: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 ci: enable building security extension 2024-07-23 09:17:36 +02:00
.mailmap Add a .mailmap file to canonicalize author names and emails 2023-03-15 18:10:51 +00:00
.travis.yml travis: Add OSX meson build to matrix 2019-05-02 15:42:58 +00:00
COPYING modesetting: Merge modesetting's COPYING into the xserver's. 2014-09-15 12:46:02 -07:00
README.md Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
meson.build xwayland: Do not enable DRI3 without eventfd 2024-08-05 10:24:58 +02:00
meson_options.txt os: drop SUN-DES-1 authentication 2024-06-18 00:52:11 +00:00
xorg-server.m4 xorg-server.m4: just all cflags instead of just sdkdir 2018-09-20 20:12:24 +01:00
xorg-server.pc.in xfree86: link modules against Xorg symbols on Cygwin 2012-04-05 21:57:07 -05: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