From: "Rodolfo García Peñas (kix)" <[email protected]>
The icons are right set in the wwin->icon and wapp->app_icon,
so we don't need search the icon and then set it before call
wIconUpdate. Just, call wIconUpdate with NULL as icon.
The change about remove "wwin->flags.miniaturized" is because
after the patches to include icon in all windows, not only the
minianturized, then we must change the icon in all windows.
- if (wwin->icon && wwin->flags.miniaturized) {
- /* Get the application icon, default included */
- file = wDefaultGetIconFile(wwin->wm_instance, wwin->wm_class, True);
- if ((file && wwin->icon->file && strcmp(file, wwin->icon->file) != 0)
- || (file && !wwin->icon->file))
- wIconChangeImageFile(wwin->icon, file);
- }
+ if (wwin->icon)
+ wIconUpdate(wwin->icon, NULL);
---
src/defaults.c | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/src/defaults.c b/src/defaults.c
index e8c33e0..4316450 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -1124,30 +1124,21 @@ void wDefaultUpdateIcons(WScreen *scr)
{
WAppIcon *aicon = scr->app_icon_list;
WWindow *wwin = scr->focused_window;
- char *file;
+ /* All windows have appicon */
while (aicon) {
- /* Get the application icon, default included */
- file = wDefaultGetIconFile(aicon->wm_instance, aicon->wm_class,
True);
- if ((file && aicon->icon->file && strcmp(file,
aicon->icon->file) != 0)
- || (file && !aicon->icon->file)) {
- wIconChangeImageFile(aicon->icon, file);
- wAppIconPaint(aicon);
- }
+ wIconUpdate(aicon->icon, NULL);
+ wAppIconPaint(aicon);
aicon = aicon->next;
}
if (!wPreferences.flags.noclip)
wClipIconPaint(scr->clip_icon);
+ /* All windows have icon */
while (wwin) {
- if (wwin->icon && wwin->flags.miniaturized) {
- /* Get the application icon, default included */
- file = wDefaultGetIconFile(wwin->wm_instance,
wwin->wm_class, True);
- if ((file && wwin->icon->file && strcmp(file,
wwin->icon->file) != 0)
- || (file && !wwin->icon->file))
- wIconChangeImageFile(wwin->icon, file);
- }
+ if (wwin->icon)
+ wIconUpdate(wwin->icon, NULL);
wwin = wwin->prev;
}
}
--
1.7.10.4
--
To unsubscribe, send mail to [email protected].