wIconChangeTitle rewritten
commit6aa43d356ca3c7ee44748212d9318f7005d2d140
authorRodolfo García Peñas (kix) <kix@kix.es>
Mon, 8 Apr 2013 17:40:58 +0000 (8 19:40 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Tue, 9 Apr 2013 07:30:54 +0000 (9 08:30 +0100)
tree648ad2af88a150efba9ea7594f7e9cb010cf065b
parentfa27215fcc3a1d11c0e95135a1c586980c01ca5f
wIconChangeTitle rewritten

The function wIconChangeTitle() now changes the icon title name
doing the full work (except painting it).

The function receives now the icon to change the name and the
wwindow with the new name. The function checks if icon and the
window exists.

Then, try to get the name using wNETWMGetIconName(), if not found
then try to read it from wGetIconName(). Then the icon has the new
name and the function returns.

This is better because:

1. We don't need a flag to know if the window got the name
   using the wNETWMGetIconName function. Now call this function
   always.

2. We do the same work in all calls to the wIconChangeTitle()
   function.

The functions that uses wIconChangeTitle (at client.c, icon.c and
wmspec.c) uses always the value set by wNETWMGetIconName() first,
else, the value set by wGetIconName(). This is the reason for the
flag net_has_icon_title. Now the flag can be removed.
src/client.c
src/icon.c
src/icon.h
src/window.h
src/wmspec.c