Skip to content

Commit

Permalink
anbox: fix WM_CLASS
Browse files Browse the repository at this point in the history
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
  • Loading branch information
samueldr authored and rnhmjoj committed Sep 4, 2023
1 parent e8a3931 commit 73767bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/os-specific/linux/anbox/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 73767bb

Please sign in to comment.