mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
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.
This commit is contained in:
committed by
Carlos R. Mafra
parent
fa27215fcc
commit
6aa43d356c
@@ -1470,8 +1470,8 @@ void wNETWMCheckClientHintChange(WWindow *wwin, XPropertyEvent *event)
|
||||
wfree(name);
|
||||
} else if (event->atom == net_wm_icon_name) {
|
||||
if (wwin->icon) {
|
||||
char *name = wNETWMGetIconName(wwin->client_win);
|
||||
wIconChangeTitle(wwin->icon, name);
|
||||
wIconChangeTitle(wwin->icon, wwin);
|
||||
wIconPaint(wwin->icon);
|
||||
}
|
||||
} else if (event->atom == net_wm_icon) {
|
||||
updateIconImage(wwin);
|
||||
|
||||
Reference in New Issue
Block a user