diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2025-08-11 02:01:35 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2025-08-11 02:01:35 -0400 |
| commit | 3a24f2e2793255022b18d37afae67335d5a0a2e5 (patch) | |
| tree | 0c1c865190e7f62eca4c3373d303f3118a87b02e /zola-static | |
| parent | 0f9cc900d2a2a12629f18e848a1a6c218153403f (diff) | |
improve SDL improve
Diffstat (limited to 'zola-static')
| -rw-r--r-- | zola-static/content/blog/sdl-native-wayland.md | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/zola-static/content/blog/sdl-native-wayland.md b/zola-static/content/blog/sdl-native-wayland.md index ffbf4c7..d3de71f 100644 --- a/zola-static/content/blog/sdl-native-wayland.md +++ b/zola-static/content/blog/sdl-native-wayland.md @@ -1,12 +1,10 @@ +++ -title = "Forcing SDL3 to actually use Wayland on Wayland." +title = "Why SDL3 doesn't use Wayland on Wayland." date = 2025-08-06 updated = 2025-08-08 +++ -[SDL3](https://wiki.libsdl.org/SDL3/FrontPage) is a great platform abstraction layer. On Linux, it compiles with support for both [X Window System](https://www.x.org/wiki/) and [Wayland](https://wayland.freedesktop.org/). This is great because it makes your app compatible with just about any desktop environment and window manager. - -Here's the thing. X11 apps can still run under Wayland through the XWayland compatibility layer. In the [SDL3 documentation](https://wiki.libsdl.org/SDL3/README-wayland) it says that +[SDL3](https://wiki.libsdl.org/SDL3/FrontPage) is a great platform abstraction layer. On Linux, it compiles with support for both [X Window System](https://www.x.org/wiki/) and [Wayland](https://wayland.freedesktop.org/). This is great because it makes your app compatible with just about any desktop environment or window manager. In the [SDL3 documentation](https://wiki.libsdl.org/SDL3/README-wayland) it says that > Wayland is a replacement for the X11 window system protocol and architecture and is favored over X11 by default in SDL3 However, if your compositor does not implement the `wp_fifo_manager_v1` protocol SDL will fall back to XWayland. I don't know how this protocol fits into the Wayland ecosystem, but my compositor doesn't have it. Here's how I forced SDL to use Wayland anyway (for c++). @@ -19,4 +17,3 @@ for (int i = 0; i < SDL_GetNumVideoDrivers(); i++) { } ``` This code will explicitly enable Wayland if it is available. Thanks to my friend Riley Beckett for helping figure it out. -> I [asked about this issue](https://discourse.libsdl.org/t/is-wayland-really-default) on the SDL discourse. |
