mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
wIconStore(): do not save the icon if it exists
The function wIconStore() doesn't write a new file overwriting the previous icon if the icon file exists.
This commit is contained in:
committed by
Carlos R. Mafra
parent
21fb6db616
commit
0db76b822d
@@ -473,6 +473,10 @@ char *wIconStore(WIcon * icon)
|
|||||||
if (!path)
|
if (!path)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
/* If icon exists, exit */
|
||||||
|
if (access(path, F_OK) == 0)
|
||||||
|
return path;
|
||||||
|
|
||||||
if (wwin->net_icon_image) {
|
if (wwin->net_icon_image) {
|
||||||
image = RRetainImage(wwin->net_icon_image);
|
image = RRetainImage(wwin->net_icon_image);
|
||||||
} else if (wwin->wm_hints && (wwin->wm_hints->flags & IconPixmapHint)
|
} else if (wwin->wm_hints && (wwin->wm_hints->flags & IconPixmapHint)
|
||||||
|
|||||||
Reference in New Issue
Block a user