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

WindowIcon: reload icon if more info about the window becomes available #2068

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lib/WindowIcon.vala
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ public class Gala.WindowIcon : Clutter.Actor {
}

construct {
/**
* Sometimes a WindowIcon is constructed on Meta.Display::window_created.
* In this case it can happen that we don't have any info about the app yet so we can't get the
* correct icon. Therefore we check whether the info becomes available at some point
* and if it does we try to get a new icon.
*/
window.notify["wm-class"].connect (reload_icon);
window.notify["gtk-application-id"].connect (reload_icon);

reload_icon ();
}

private void reload_icon () {
width = icon_size * scale;
height = icon_size * scale;

Expand Down
Loading