flathub / eu.betterbird.Betterbird

https://flathub.org/apps/details/eu.betterbird.Betterbird
9 stars 1 forks source link

Incorrect WM_CLASS compared to .desktop file, so Plasma's task manager can't match Betterbird to its window #22

Closed TiZ-HugLife closed 1 year ago

TiZ-HugLife commented 1 year ago

Hi there. The following was mentioned over here:

I am using the .desktop file setting StartupWMClass=betterbird-default, but I see the correct icons nevertheless. The wmclass of the running Betterbird (as reported by lg -> Windows) is thunderbird-default, though. So I don't really understand why it works for the flatpak.

I'm using this package on Kubuntu 22.04 and taskbar pinning is not working for me out of the box, because the .desktop file's StartupWMClass wants betterbird-default, but the actual window's WM_CLASS is thunderbird-default. If a StartupWMClass is defined for a .desktop file, that takes precedence over anything else it might use to find an application's windows. So the pinned application on the taskbar is not matched with Betterbird's actual window. I have no idea what GNOME is doing such that it still works for that person.

It's my impression that a recent commit was supposed to change the WM_CLASS to betterbird or betterbird-default? Unfortunately, it did not. It's still thunderbird-default on my end, and I definitely have the package built from that commit.

I can work around this issue by making a copy of the .desktop file in xdg-data/applications and changing its StartupWMClass to thunderbird-default.

mfschumann commented 1 year ago

The commit you mentioned did not fix the issue, but it only prepares the flatpak build for the upstream fix scheduled for the next Betterbird release.

That said, I've added a temporary workaround for the flatpak that is available now on flathub, so it should be enough to uninstall and install the eu.betterbird.Betterbird flatpak from flathub. In order to check if you have the correct version, you can check if the output of flatpak info eu.betterbird.Betterbird contains the commit hash 7bfe25d in the Subject line.

I'll close this issue for now. In case the new flatpak does not solve the problems for you, please add a comment and I'll reopen the issue.

TiZ-HugLife commented 1 year ago

It's all good now. Thank you for the quick fix. :)