mirror of
https://github.com/elementary/gala.git
synced 2024-11-22 18:24:47 +03:00
WindowIcon: reload icon if more info about the window becomes available (#2068)
This commit is contained in:
parent
8928954546
commit
20eef782ab
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user