From 73767bb345c7d943b2bc1cd213d7cc9b87e03a64 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sat, 5 Jun 2021 18:25:08 -0400 Subject: anbox: fix `WM_CLASS` SDL defaults to reading the executable from the running app - https://github.com/libsdl-org/SDL/blob/64724db0a1ffac7c3332df66a942d3ba27b2dc0b/src/video/x11/SDL_x11video.c#L69-L71 Which in turn gives this from xprop: ``` WM_CLASS(STRING) = ".anbox-wrapped", ".anbox-wrapped" ``` Meaning that any special casing a window manager does will be broken. This will also fallback correctly on Wayland: - https://github.com/libsdl-org/SDL/blob/d956636c85aafc055d37153d52370e9b1c2c5929/src/video/wayland/SDL_waylandvideo.c#L93-L99 --- pkgs/os-specific/linux/anbox/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'pkgs/os-specific/linux/anbox') diff --git a/pkgs/os-specific/linux/anbox/default.nix b/pkgs/os-specific/linux/anbox/default.nix index 67419e8d5c56c..f375e7a52b236 100644 --- a/pkgs/os-specific/linux/anbox/default.nix +++ b/pkgs/os-specific/linux/anbox/default.nix @@ -129,6 +129,7 @@ stdenv.mkDerivation rec { postInstall = '' wrapProgram $out/bin/anbox \ + --set SDL_VIDEO_X11_WMCLASS "anbox" \ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [libGL libglvnd]} \ --prefix PATH : ${git}/bin -- cgit 1.4.1