Remove cache icon when detached
commit7a2eb68aa47a35eede44457db5d300719be4dcdd
authorRodolfo García Peñas (kix) <kix@kix.es>
Sun, 23 Aug 2015 18:56:59 +0000 (23 20:56 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 23 Aug 2015 21:08:30 +0000 (23 22:08 +0100)
tree92245c9c3bfcc095865223a74cea8001ed23e050
parent8a822004eef716d3a154a78960773d52d9cc8253
Remove cache icon when detached

This pach removes the icon from the icon cache when the icon is
detached from the dock/clip.

That helps to hold tidy the icon cache folder.

-------8<-------
Also app icon caching was broken around the same time. The app icon cache
in CachedPixmaps was meant to store icons retrieved from X clients so the
dock or clip can display those when the client is not running like after
startup. The cache should contain only such icons and the path should never
appear in WMWindowAttributes because the cache is an internal thing used to
look up icons not otherwise available. If you look at your WMWindowAttributes
now it is full of entries referring to the cache that should not be there and
if you look at the cache dir you'll find a lot of icons from all apps you've
ever started while there should be only the few docked ones that use client
side icons. Also the cache is never cleaned up only new icons are added to it.
-------8<-------

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
src/dock.c
src/icon.c
src/icon.h