-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Because Unix GUIs have traditionally been synonymous with X11, lots of Linux/Unix software will connect to a display server using protocol-agnostic APIs like SDL or GTK, then blindly assume that it is an X11 display and do X11-specific things with it. We saw this in GTK when GTK 3 gained native Wayland support, and we're seeing it again in SDL now that more distributions are compiling SDL 2 with native Wayland support, particularly now that 2.0.22rc1 behaves like GTK 3 by prioritizing native Wayland higher than X11.
A GTK example is that in Vim's GTK GUI, all the text is one big GTK widget, and instead of drawing text the GTK way (with Cairo), Vim draws its text by requesting the underlying X11 window and scribbling on it directly with X11 APIs. A SDL example is that as mentioned in #5527 (comment), games that use NVIDIA Cg use X11 directly, and so do games that call glXGetProcAddress() or similar.
The GTK developers added a way for developers who know they are going to use X11 directly to force the issue: you can call gdk_set_allowed_backends ("x11")
to require that specific backend to be used, and Vim now does that.
I think it might be a good idea for SDL to have something similar, so that in games that are still maintained, if the maintainer knows they are using X11 directly, they can bypass the native Wayland video driver and force use of the X11 video driver (which will end up using Xwayland).