[bug#33935] PATCH] gnu: sdl2: Fix Wayland support.

Message ID 20181231101700.38c9867e@mykolab.com
State Accepted
Headers show
Series [bug#33935] PATCH] gnu: sdl2: Fix Wayland support. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Rutger Helling Dec. 31, 2018, 10:17 a.m. UTC
Hi Guix,

I've discovered that our SDL2 unfortunately does not correctly support
Wayland at the moment. I found while running Xonotic I could still kill
the window with xkill, even with the SDL_VIDEODRIVER=wayland variable
set. I unset the DISPLAY variable and tried running it that way and
found that it gave an error and refused to start.

This patch should fix the support. I can now run 'DISPLAY=""
SDL_VIDEODRIVER=wayland xonotic' and it'll run. The window cannot be
killed by xkill, which means it's running Wayland natively.

Comments

Rutger Helling Dec. 31, 2018, 10:26 a.m. UTC | #1
Ignore this, the problem was due to a wrong alias in my .bashrc. Sorry
for the noise!

On Mon, 31 Dec 2018 11:17:00 +0100
Rutger Helling <rhelling@mykolab.com> wrote:

> Hi Guix,
> 
> I've discovered that our SDL2 unfortunately does not correctly support
> Wayland at the moment. I found while running Xonotic I could still
> kill the window with xkill, even with the SDL_VIDEODRIVER=wayland
> variable set. I unset the DISPLAY variable and tried running it that
> way and found that it gave an error and refused to start.
> 
> This patch should fix the support. I can now run 'DISPLAY=""
> SDL_VIDEODRIVER=wayland xonotic' and it'll run. The window cannot be
> killed by xkill, which means it's running Wayland natively.

Patch

From 8861047922636a8a7cb10ca4a753c16c896b1ff9 Mon Sep 17 00:00:00 2001
From: Rutger Helling <rhelling@mykolab.com>
Date: Mon, 31 Dec 2018 11:07:05 +0100
Subject: [PATCH] gnu: sdl2: Fix Wayland support.

* gnu/packages/sdl.scm (sdl2)[propagated-inputs]: Add "wayland-protocols".
[inputs]: Remove "wayland-protocols".
---
 gnu/packages/sdl.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 619892572..e272c0f8d 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -116,6 +116,9 @@  joystick, and graphics hardware.")
        ((#:configure-flags flags)
         `(append '("--disable-wayland-shared")
                  ,flags))))
+    (propagated-inputs
+     (append `(("wayland-protocols" ,wayland-protocols))
+             (package-propagated-inputs sdl)))
     (inputs
      ;; SDL2 needs to be built with ibus support otherwise some systems
      ;; experience a bug where input events are doubled.
@@ -126,8 +129,7 @@  joystick, and graphics hardware.")
                ("glib" ,glib)
                ("ibus" ,ibus)
                ("libxkbcommon" ,libxkbcommon)
-               ("wayland" ,wayland)
-               ("wayland-protocols" ,wayland-protocols))
+               ("wayland" ,wayland))
              (package-inputs sdl)))
     (license bsd-3)))
 
-- 
2.20.1