mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 22:28:02 +01:00
Move out wIconUpdate from set_icon_image_from_database
The function set_icon_image_from_database() set the icon from the database, but wIconUpdate() update the icon using different methods , like for example get the image from X11. So, is better move the wIconUpdate() to the function who call set_icon_image_from_database(), to avoid understanding problems.
This commit is contained in:
committed by
Carlos R. Mafra
parent
883ed8ac9a
commit
544bc8e7a7
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user