NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.95k stars 13.97k forks source link

discord: Discord with OpenASAR fails to show title bar #237129

Open OvercastWarmth opened 1 year ago

OvercastWarmth commented 1 year ago

Describe the bug

When using Discord from nixpkgs with OpenASAR overridden on top the title bar is missing

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install Discord with OpenASAR enabled
  2. Launch Discord
  3. Title bar is missing

Expected behavior

The window has a GTK title bar

Screenshots

image

Additional context

Using GNOME 44.1 under Wayland

Notify maintainers

@MP2E @Scrumplex @artturin @infinidoge @jopejoe1

Metadata

[ringlings@Adylis:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.31, NixOS, 23.05 (Stoat), 23.05.730.85bcb95aa83`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - channels(root): `"home-manager-23.05.tar.gz, nixos-23.05, nixos-unstable, nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Infinidoge commented 1 year ago

That is... very strange. This feels more like a compositor-side issue, since I don't think Discord itself handles the title bar under Wayland(?).

Can you confirm that it properly has the title bar when OpenASAR is disabled?

OvercastWarmth commented 1 year ago

Yep, we've tried just discord, discord w/ vencord, discord w/ OA, and discord w/ both. The issue only occurs when OA is enabled

surfaceflinger commented 1 year ago

It's caused by your environment variables https://github.com/Ringlings/nixos/blob/master/patches/wayland.nix and looks like OA makes one of these work.

Discord's electron setup simply isn't ready for wayland yet, or should I say they don't care at all :)

getchoo commented 1 year ago

i'm able to reproducible this currently on nixos unstable with mutter. the vanilla client seems to be fine when using wayland now, and this only appears when openasar is enabled

you can try using these two commands:

$ NIXPKGS_ALLOW_UNFREE=1 nix run --impure --expr \
      'with import (builtins.getFlake "nixpkgs/nixos-unstable") {};
        discord-canary.override {withOpenASAR = true;}
      '

$ NIXPKGS_ALLOW_UNFREE=1 nix run --impure --expr \
      'with import (builtins.getFlake "nixpkgs/nixos-unstable") {};
        discord-canary                                
      '

these (should) result in the following image

image