Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon in window title bar in KDE Plasma/KWin shows a Wayland W logo rather than WebCord logo. #62

Closed
ludg1e opened this issue Aug 20, 2023 · 6 comments

Comments

@ludg1e
Copy link

ludg1e commented Aug 20, 2023

Hello!

Recently I've found out about WebCord and installed it on my system through Flathub.
The app works flawlessy, but unfortunately I noticed a minor bug that sometimes happens with apps under Wayland in KDE, is that the icon in the window title bar is the Wayland logo (W) rather than the app icon.
image

A workaround that I've tested and works is by adding a KWin app (or window) rule that specifies the desktop file of the flatpak app (io.github.spacingbat3.webcord) rather than "WebCord".
image
Workaround KWin rule code:

[Application settings for WebCord]
Description=Application settings for WebCord
desktopfile=io.github.spacingbat3.webcord
desktopfilerule=4
wmclass=\sWebCord
wmclasscomplete=true
wmclassmatch=1

While this workaround works, it's a dirty solution to a problem that, due to my OS nature (immutable) I can't test if it happens on other distributions of WebCord (not flatpak).
I'm reporting this here since I can't give evidence that this happens on other OSes or packages that aren't flatpak.

So, I'm hoping someone can try reproduce it, and if possible, provide a fix.
Though I think this is more an error of the main repo of WebCord rather than the flatpak.

Some logs:
https://hatebin.com/fgoafndhmq

OS:
image

Some resources that I've found on the way:
https://discussion.fedoraproject.org/t/inconsistant-titlebar-icons-for-wayland-apps/36810
https://nicolasfella.de/posts/fixing-wayland-taskbar-icons/
https://bugs.kde.org/show_bug.cgi?id=453776
flathub/com.spotify.Client#68 (comment)

Thank you and have a nice day.

@axtloss
Copy link
Collaborator

axtloss commented Aug 20, 2023

Thanks for the extensive bug report! Considering you have a possible solution, could you open a pull request with the fix applied? The desktop file is located (here)[https://github.com/flathub/io.github.spacingbat3.webcord/blob/master/vitamins/io.github.spacingbat3.webcord.desktop]

Also a sidenote, WebCord offers appimages which tend to work on most distros, so you could test the appimages on immutable distros

@ludg1e
Copy link
Author

ludg1e commented Aug 20, 2023

I think you've misunderstood.
I haven't figured out how to fix it yet.

The workaround with KWin works by importing the script into KWin, but it shouldn't be the way of fixing this, as well that the rule can't work on .desktop files.

The current issue is that the window doesn't find under KWin the right flatpak desktop file (I think).

I've tested the appimage and it has the issue fixed, though I don't know why.

By the way, why isn't this method of building, which is based on the tarball, being used?
https://github.com/vega-d/WebCord_flatpak_build

@ludg1e
Copy link
Author

ludg1e commented Aug 20, 2023

Maybe @TheEvilSkeleton could shed some light (sorry for pinging you).

@axtloss
Copy link
Collaborator

axtloss commented Aug 20, 2023

I think you've misunderstood.
I haven't figured out how to fix it yet.
The workaround with KWin works by importing the script into KWin, but it shouldn't be the way of fixing this, as well that the rule > can't work on .desktop files.

Oh yeah my bad, I didn't read the code snippet correctly and thought it's a .desktop file.
I do have the same issue with all flatpak applications that run natively on wayland and use GTK. A possible workaround would be to restrict webcord of wayland permissions so that it launches using Xorg, which should make the icon appear

@ludg1e
Copy link
Author

ludg1e commented Aug 20, 2023

While I can live with the KWin script, this should be somehow addressed, as this issue on most apps has been addressed upstream rather than through the distribution method/service.
Which is the current state of building WebCord from the source rather than extracting the appimage?

@ludg1e
Copy link
Author

ludg1e commented Aug 20, 2023

Though looking at pending PRs, it seems that an upcoming custom window bar will be available at some point (probably), so I don't think it's worth it spending more time looking into this.

If someone wants to get a quick fix just use the KWin script, stick with the bug or use XWayland/X11.

Have a nice day.

@ludg1e ludg1e closed this as completed Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants