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

Fix Wayland window associations #334

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

ReillyBrogan
Copy link
Contributor

Wayland compositors use the appId/desktopFileName window property in order to associate open windows with the correct .desktop file. Ludusavi wasn't setting this field, and iced doesn't appear to have any default behavior around it (Qt for example sets it by default to the binary name) which was causing it to be empty. This would mean that Wayland compositors would never associate ludusavi windows with the ludusavi.desktop launcher, which for example would cause KDE Plasma to show the generic Wayland icon in the top left of the and in the overview. If Ludusavi was pinned to a task manager clicking on it would also result in windows being opened as a new entry and not grouped under the Ludusavi icon. Fix both of those issues and various other erroneous behavior by setting the appId to the correct string (it should be the name of the .desktop file without the .desktop extension).

Before:
image

After:
image

@mtkennerly
Copy link
Owner

Thanks for this!

It looks like we just need to add a cfg directive so we don't break the Windows and Mac builds.

@ReillyBrogan
Copy link
Contributor Author

It looks like we just need to add a cfg directive so we don't break the Windows and Mac builds.

Done.

@mtkennerly mtkennerly merged commit f3235c0 into mtkennerly:master Apr 16, 2024
9 checks passed
@mtkennerly mtkennerly added this to the v0.23.0 milestone Apr 16, 2024
@ReillyBrogan ReillyBrogan deleted the fix-appid branch April 16, 2024 20:39
@mtkennerly mtkennerly added the bug Something isn't working label Apr 16, 2024
mtkennerly added a commit that referenced this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants