Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Wayland support…  (Read 1104 times)

A_Curious_Cat

  • Bay Watcher
    • View Profile
Wayland support…
« on: November 10, 2021, 08:05:10 pm »

The Wayland protocol is a newer protocol designed to connect clients to a “compositor” which draws them on screen.  In this way, it is similar to the X protocol but is designed to be more secure from the ground up. 

Currently, many Linux distributions have varying levels of support for various Wayland compositors (for example:  mutter -which is used by Gnome-, and the KWin compositor -which is used by KDE;  The bigger problem is hardware -Wayland seems to work just fine on AMD and Intel hardware, but support is atrocious on Nvidia hardware). 

Despite these initial problems, Wayland is expected to eventually replace X as the primary graphical environment under Linux (indeed, some distributions have announced plans to ditch X for Wayland sooner, rather than later), and development of X has already, afaik, been stopped except for security patches.

Currently, DF makes use of X when running under Linux through version 1.2 of the SDL library.  Support for Wayland, however was only added with version 2.0.2 of SDL, and only turned on by default in version 2.0.4. 

As stated above, many Linux distributions are actively planning on switching from X to Wayland (and, in fact, plan on removing X from their distributions).  This creates a problem for DF in that, currently, DF cannot run under Wayland. 

One possible solution, is for the user to run DF under XWayland (which allows X clients to run under Wayland).  However, this is likely to be only a temporary solution, as XWayland opens up all of the same potential security holes that Wayland is supposed to close (and, therefore, security conscious users are likely to disable it on security grounds), and as more and more programs support Wayland users may question why they should have XWayland installed just to run DF. 

A better, longer term, solution would be to update DF to use a version of SDL that supports Wayland.  For this reason, I believe that DF should be updated to use SDL 2.0.4, or higher.  Thank you.
Logged
Really hoping somebody puts this in their signature.

Ziusudra

  • Bay Watcher
    • View Profile
Re: Wayland support…
« Reply #1 on: November 27, 2021, 02:40:56 am »

I was just reminded that the graphics stack for DF on GNU/Linux is open-source, so it might technically be possible for any one to update it to SDL2. See the repos of Baughn, rofl0r, and svenstaro

Also, the SDL wiki has a Migration Guide
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

Mr Crabman

  • Bay Watcher
  • A person with the head and pincers of a crab.
    • View Profile
Re: Wayland support…
« Reply #2 on: November 27, 2021, 03:18:09 am »

Toady has expressed interest in switching to SDL2 in FotF, but there's not much about the timescale (he said that before the Steam release is not appropriate due to time pressure, and he doesn't want to risk "throwing a month long wrench" into the process).