xserver/hw/xwayland
Olivier Fourdan 3c07a01c42 xwayland: Use xdg-output name for XRandR
Currently, Xwayland assigns sequential output names for XRandR. When an
output is hotplugged, a new name is assigned sequentially (XWAYLAND0,
XWAYLAND1, etc.). This is a problem because if a monitor is unplugged
and plugged again, it will get a new name each time.

Luckily, xdg-output provides us with a name for the outputs.

Even though the protocol states that the name is not a reflection of the
underlying DRM connector name, it is to remain consistent across
sessions with the same hardware and software configuration.

So we could use the xdg-output name for the XRandR reported name for the
output.

Doing so is a bit tricky though, because the output name is set at
creation and is not supposed to change. The xdg-output event that
provides us with the name will come at a later time.

So we just allocate a default fixed size for the output name at creation
and just replace the default output name with the xdg-output name when
that is known.

Also, historically, some X11 clients were expecting output names in
Xwayland to be named XWAYLAND<x> and used that to check whether they
were running on Xwayland. Those clients should now use the Xwayland X11
extension which is designed specifically for that purpose.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1353
See-also: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/954
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2023-02-13 14:41:05 +01:00
..
desktop xwayland: set the app_id and install a desktop launcher 2022-06-30 17:53:01 +02:00
man xwayland: add optional support for libdecor 2022-06-30 17:53:01 +02:00
.gitignore xwayland: Add wp_viewport wayland extension support 2019-10-12 12:19:14 +02:00
drm.xml wayland: Sync drm.xml with Mesa 2017-07-05 10:13:04 -04:00
meson.build xwayland: Implement xwayland_shell_v1 2022-12-21 11:13:07 +00:00
xwayland-cursor.c xwayland: Fix cursor color 2022-02-11 10:33:10 +01:00
xwayland-cursor.h xwayland: Add xwl_cursor_clear_frame_cb() 2021-10-25 12:05:42 +00:00
xwayland-cvt.c xwayland: Use libxcvt 2021-08-06 11:29:29 +00:00
xwayland-cvt.h xwayland: Move Xwayland CVT declaration 2019-12-20 16:19:01 +01:00
xwayland-drm-lease.c xwayland: make the output serials belong to the screen 2022-06-30 16:33:30 +02:00
xwayland-drm-lease.h Xwayland: implement drm-lease-v1 2021-12-07 10:02:29 +00:00
xwayland-glamor-eglstream.c xwayland: Add get_drawable_modifiers implementation 2023-01-20 17:56:54 +00:00
xwayland-glamor-gbm.c xwayland: fix GBM on driver without explicit modifiers 2023-02-13 13:26:59 +00:00
xwayland-glamor-xv.c xwayland: Cleanup and remove `xwayland.h` 2019-12-20 16:19:01 +01:00
xwayland-glamor.c xwayland: Spell Xwayland consistently in error messages 2023-02-13 13:02:55 +00:00
xwayland-glamor.h xwayland: Add get_drawable_modifiers implementation 2023-01-20 17:56:54 +00:00
xwayland-glx.c xwayland/glx: Mirror all EGLConfigs 2022-12-06 12:48:58 -05:00
xwayland-glx.h xwayland: Move Xwayland GLX declaration 2019-12-20 16:19:01 +01:00
xwayland-input.c xwayland: wl_pointer.axis_v120 is no longer optional 2023-02-09 22:57:00 +00:00
xwayland-input.h xwayland: hook up wl_pointer.axis_v120 events 2023-01-18 13:33:54 +10:00
xwayland-output.c xwayland: Use xdg-output name for XRandR 2023-02-13 14:41:05 +01:00
xwayland-output.h xwayland/output: properly return the current emulated mode when queried 2023-01-03 23:27:30 +07:00
xwayland-pixmap.c xwayland: Rename xwl_pixmap_cb → xwl_buffer_release_cb 2020-07-07 13:47:11 +00:00
xwayland-pixmap.h xwayland: Rename xwl_pixmap_cb → xwl_buffer_release_cb 2020-07-07 13:47:11 +00:00
xwayland-present.c xwayland: Send PresentCompleteModeSuboptimalCopy if dmabuf feedback was resent 2023-01-20 17:56:54 +00:00
xwayland-present.h xwayland: Always hook up frame_callback_list in xwl_present_queue_vblank 2022-03-17 10:22:34 +01:00
xwayland-screen.c xwayland: Spell Xwayland consistently in error messages 2023-02-13 13:02:55 +00:00
xwayland-screen.h xwayland: Implement linux_dmabuf_feedback event handlers 2023-01-20 17:56:54 +00:00
xwayland-shm.c xwayland/shm: Avoid integer overflow on large pixmaps 2021-10-05 10:00:02 +00:00
xwayland-shm.h xwayland: Move SHM declarations to their own header 2019-12-20 16:19:01 +01:00
xwayland-types.h Xwayland: implement drm-lease-v1 2021-12-07 10:02:29 +00:00
xwayland-vidmode.c xwayland: add a fixed geometry size for rootful 2022-06-30 17:52:22 +02:00
xwayland-vidmode.h xwayland: Move Xwayland vidmode declaration 2019-12-20 16:19:01 +01:00
xwayland-window-buffers.c xwayland: Hold window buffer until released 2020-12-10 13:49:42 +01:00
xwayland-window-buffers.h xwayland: Cleanup and remove `xwayland.h` 2019-12-20 16:19:01 +01:00
xwayland-window.c xwayland: Spell XWAYLAND consistently in debug messages 2023-02-13 13:02:55 +00:00
xwayland-window.h xwayland: Send PresentCompleteModeSuboptimalCopy if dmabuf feedback was resent 2023-01-20 17:56:54 +00:00
xwayland.c xwayland: Do not use "XWayland" spelling in code identifiers 2023-02-13 13:02:55 +00:00
xwayland.pc.in Disallow byte-swapped clients by default 2023-01-06 11:59:37 +10:00