linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.48k stars 729 forks source link

Qt flatpaks do not use system cursor theme consistently #11868

Open MiZoG99 opened 12 months ago

MiZoG99 commented 12 months ago

Qt flatpak applications (confirmed in my system with Keepassxc, Nextcloud Client, Qbittorrent, ProtonUp-Qt) do not consistently use my cursor theme (currently the default -- "style" "theme" are the default ones as well).

Bibata-modern-classic is used as normal while clicking title bars and grabbing window edges to resize.

Screenshot from 2023-09-16 01-54-22

When I click on the main pane in each and every of qt flatpak apps cursor theme changes to something else:

Screenshot from 2023-09-16 01-55-19

What I did try:

  1. flatpak --user override --filesystem=/usr/share/icons/:ro in a terminal - I don't have any themes and icon sets installed in my "user"
  2. sudo update-alternatives --config x-cursor-theme - idea taken from the release notes of a previous Mint release. Default theme was already selected in system alternatives as default as expected.
  3. Setting "partial" permissions with Flatseal, for example /user/share/themes:ro. In fact this is same with setting overrides in the command line.
  4. Give permissions in Flatseal for all flatpaks to use all "system" and (just in case) "user" files. No joy.

Please note that everything works as it should on at least LMDE5 and I don't recall having to lift a finger for that.

Full system specs

thank ya 'n' good hunting!

ghost commented 12 months ago

Other flatpak packages are showing the same behaviour with the cursor theme but I noticed they all have one thing in common: they all run on the org.kde.Platform. Flatpak packages running on org.gnome.Platform or org.freedesktop.Platform do not show this issue.

Harry-W-Haines-III commented 12 months ago

I am wondering if we need Cinnamon to create the /usr/share/icons/default/index.theme file based on what cursor the user chooses. Right now I do that with a script to nail it down.

echo "Set Adwaita Mouse Pointer theme in root, Qt and Flatpak applications ..." echo " " echo '[Icon Theme]' | sudo tee /usr/share/icons/default/index.theme echo 'Name=Breeze' | sudo tee -a /usr/share/icons/default/index.theme echo 'Comment=Breeze by the KDE VDG' | sudo tee -a /usr/share/icons/default/index.theme echo 'Inherits=Adwaita' | sudo tee -a /usr/share/icons/default/index.theme

clefebvre commented 11 months ago

You can't have a user preference affect system wide files.

Harry-W-Haines-III commented 11 months ago

Since I am always the only user, I set it that way. How about placing it in ~/.icons or ~/.local/share/icons?

anaximeno commented 11 months ago

Since I am always the only user, I set it that way. How about placing it in ~/.icons or ~/.local/share/icons?

It should already be placed there, can you test changing the cursor theme and see if they are placed there?

Also, cursor themes for qt apps (and flatpak apps) are not applied immediately I believe, if you change a cursor theme, close and reopen a qt (or flatpak) app will it be applied? Also for flatpak apps, you might have to give access to the home dir in Flatseal (for it to have access to the .icons and .local/share/icons dirs).

clefebvre commented 11 months ago

Let's move this upstream. It's a Cinnamon issue.

MiZoG99 commented 11 months ago

Started playing with different cursor themes and all of a sudden realized that cursor changes applied to flatpaks (qt included). Seems flatpak detects the default cursor theme form ~/.icons/default/index.theme created for user when you apply changes in "Themes". This file is not there in a fresh install. The fix looks so easy after all. So perhaps the solution is to create it automatically for the user on a new installation?