summary refs log tree commit diff
path: root/pkgs/os-specific/linux/anbox
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2021-06-05 18:25:08 -0400
committerrnhmjoj <rnhmjoj@inventati.org>2023-09-04 08:51:54 +0200
commit73767bb345c7d943b2bc1cd213d7cc9b87e03a64 (patch)
tree28b5eb457c225adf504c9994649447ab5fdacdea /pkgs/os-specific/linux/anbox
parente8a39314fcb623e9191eb2f810e222e93f703de7 (diff)
downloadnixpkgs-73767bb345c7d943b2bc1cd213d7cc9b87e03a64.tar
nixpkgs-73767bb345c7d943b2bc1cd213d7cc9b87e03a64.tar.gz
nixpkgs-73767bb345c7d943b2bc1cd213d7cc9b87e03a64.tar.bz2
nixpkgs-73767bb345c7d943b2bc1cd213d7cc9b87e03a64.tar.lz
nixpkgs-73767bb345c7d943b2bc1cd213d7cc9b87e03a64.tar.xz
nixpkgs-73767bb345c7d943b2bc1cd213d7cc9b87e03a64.tar.zst
nixpkgs-73767bb345c7d943b2bc1cd213d7cc9b87e03a64.zip
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
Diffstat (limited to 'pkgs/os-specific/linux/anbox')
-rw-r--r--pkgs/os-specific/linux/anbox/default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/anbox/default.nix b/pkgs/os-specific/linux/anbox/default.nix
index 67419e8d5c5..f375e7a52b2 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