diff --git a/src/appicon.c b/src/appicon.c index 117fddb4..b196931f 100644 --- a/src/appicon.c +++ b/src/appicon.c @@ -266,6 +266,9 @@ void removeAppIconFor(WApplication *wapp) set_icon_image_from_database(wapp->app_icon->icon, wapp->app_icon->wm_instance, wapp->app_icon->wm_class, wapp->app_icon->command); + /* Update the icon, because wapp->app_icon->icon could be NULL */ + wIconUpdate(wapp->app_icon->icon); + /* Paint it */ wAppIconPaint(wapp->app_icon); } else if (wapp->app_icon->docked) { diff --git a/src/icon.c b/src/icon.c index c6d744c6..d5f857ca 100644 --- a/src/icon.c +++ b/src/icon.c @@ -143,6 +143,8 @@ WIcon *icon_create_for_wwindow(WWindow *wwin) icon->tile_type = TILE_NORMAL; set_icon_image_from_database(icon, wwin->wm_instance, wwin->wm_class, NULL); + /* Update the icon, because icon could be NULL */ + wIconUpdate(icon); WMAddNotificationObserver(appearanceObserver, icon, WNIconAppearanceSettingsChanged, icon); WMAddNotificationObserver(tileObserver, icon, WNIconTileSettingsChanged, icon); @@ -158,6 +160,8 @@ WIcon *icon_create_for_dock(WScreen *scr, char *command, char *wm_instance, char icon->tile_type = tile; set_icon_image_from_database(icon, wm_instance, wm_class, command); + /* Update the icon, because icon could be NULL */ + wIconUpdate(icon); WMAddNotificationObserver(appearanceObserver, icon, WNIconAppearanceSettingsChanged, icon); WMAddNotificationObserver(tileObserver, icon, WNIconTileSettingsChanged, icon); @@ -885,6 +889,4 @@ void set_icon_image_from_database(WIcon *icon, char *wm_instance, char *wm_class icon->file_image = get_rimage_from_file(icon->core->screen_ptr, icon->file, wPreferences.icon_size); wfree(file); } - - wIconUpdate(icon); }