NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.9k stars 13.95k forks source link

Telegram on Wayland doesnt use system cursor theme. #181176

Closed ghost closed 8 months ago

ghost commented 2 years ago

Describe the bug

On Wayland (with QT_QPA_PLATFORM=wayland), Telegram doesn't use the system cursor theme.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Open Wayland with QT_QPA_PLATFORM=wayland set
  2. notice how the cursor doesn't use the system's cursor theme and instead uses a simple, small black cursor theme

Expected behavior

Telegram on wayland should use the system's cursor theme.

Screenshots

Screenshot from 2022-07-11 20-22-13 Screenshot from 2022-07-11 20-22-46 Here it's on wayland Screenshot from 2022-07-11 20-23-43 Screenshot from 2022-07-11 20-23-46 Here it's on Xwayland.

Additional context

Also just noticed that it only renders like half the cursor or 75% of the cursor, but screenshots seem to make the cursor render correctly.

Notify maintainers

@oxalica

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 5.18.10-zen1, NixOS, 22.11 (Raccoon), 22.11pre390948.5f43d8b088d`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.9.1`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
andresilva commented 2 years ago

I have the same problem on Xorg, it started when telegram moved from Qt5 to Qt6 (not implying it's related to that though).

iosmanthus commented 2 years ago

Same issue is encountered in xorg + i3. I currently pinned tdesktop package to commit: 0c3bf3a5c3ab6be29138b88900c417660a284fbd to workaround this issue.

Hentioe commented 2 years ago

Contrary to you, I found this behavior in X11, everything works fine in Wayland.

leiserfg commented 2 years ago

The same happens in awesome, will be good to test it on kde/gnome maybe is something qt6 is using from the desktop?

lfdominguez commented 2 years ago

Happens in XMonad too..

berberman commented 2 years ago

+1 for xmonad

oxalica commented 2 years ago

Sorry I'm not really maintaining tdesktop now. cc @NickCao, seems to be an issue of Qt6?

Personally, I doesn't have cursor issue on sway.

NickCao commented 2 years ago

Most likely an issue with Qt6, but I'm also at a loss what to do to fix this.

I noticed we had a patch for Xcursor on qt-5, could that be related? https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0007-qtbase-xcursor.patch (it even applies cleanly on qt-6)

Could anyone do a preliminary test by setting

export LD_LIBRARY_PATH=${xorg.libXcursor}/lib
ghost commented 1 year ago

This still happens on gnome wayland, same as i reported on the original post.

SamLukeYes commented 1 year ago

I can reproduce it on gnome wayland.

ghost commented 1 year ago

Ok, so, this also affects other applications:

MartiniMoe commented 1 year ago

Any news on this? Still facing this issue :(

leiserfg commented 1 year ago

I'm using qtile in x11 and hyprland in wayland and it's working fine in both.

stereomato commented 1 year ago

it's still an issue, almost opened another bug report lol @leiserfg this affects apps running on wayland mode.

almino commented 1 year ago

It also happens to me on multiple machines.

9ary commented 11 months ago

Dug into this a bit, I can't figure out what tries to load libXcursor yet, but:

For what it's worth, I can't repro this bug (on sway).

9ary commented 11 months ago

Okay, now I've confirmed that libXcursor isn't used at all. libqgtk3 (ie QT_QPA_PLATFORMTHEME=gtk3) links against it. Disabling the platform theme makes libXcursor disappear entirely from the LD_DEBUG output.

Let's just drop the LD_LIBRARY_PATH hack because it breaks things.

9ary commented 11 months ago

By the way, for whoever this is still broken, it could simply be a configuration issue. Just for a sanity check, and to cross-check variables, please post the following information:

stereomato commented 8 months ago

I don't have this issue anymore, but I do have issues on other applications such as mpv and xwayland games :/

almino commented 8 months ago

I also confirm the issue is gone. Cursors are working on Telegram.

leiserfg commented 8 months ago

I use nix as:

and it does not happen to me in any of them, so I consider the issue gone a long time ago.