Avoid icon change to default on winspector save
commit0a461416e3dca9d4cd21259b6d1499f56b806133
authorRodolfo García Peñas (kix) <kix@kix.es>
Wed, 28 Nov 2012 23:10:18 +0000 (29 00:10 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Thu, 29 Nov 2012 09:37:42 +0000 (29 09:37 +0000)
tree1a37f8d86b95ac47d3784f80c220fed726b12521
parentc164db31bf39ec63cb7ab1778e80bba9c945e074
Avoid icon change to default on winspector save

For a icon, the icon image is stored in icon->file_image. If we repaint
the image, we we don't need search the icon again. We can continue using
icon->file_image.

Indeed, if launch the "window inspector" window (winspector), using a
saved icon and "ignore client icon" set, then the database holds the
name of the icon to draw on the screen. If we remove the icon info in
the winspector (removing the file name or un-setting the "ignore client
icon" flag, then the database losts the icon name and then the function
wDefaultUpdateIcons() cannot find the icon to draw for the icon.

In winspector, with this patch, the previous image set by "ApplySettings"
and stored at icon->file_image is used.
src/defaults.c