Skip to content

Commit 20eef78

Browse files
authored
WindowIcon: reload icon if more info about the window becomes available (#2068)
1 parent 8928954 commit 20eef78

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/WindowIcon.vala

+13
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ public class Gala.WindowIcon : Clutter.Actor {
2929
}
3030

3131
construct {
32+
/**
33+
* Sometimes a WindowIcon is constructed on Meta.Display::window_created.
34+
* In this case it can happen that we don't have any info about the app yet so we can't get the
35+
* correct icon. Therefore we check whether the info becomes available at some point
36+
* and if it does we try to get a new icon.
37+
*/
38+
window.notify["wm-class"].connect (reload_icon);
39+
window.notify["gtk-application-id"].connect (reload_icon);
40+
41+
reload_icon ();
42+
}
43+
44+
private void reload_icon () {
3245
width = icon_size * scale;
3346
height = icon_size * scale;
3447

0 commit comments

Comments
 (0)