On Thu, 01 Nov 2012, Rodolfo kix Garcia escribió:

> Hi,
> 
> I need help with Atoms. Now the windows are using 
> wNETWMGetWindowName(Window*) to set the window title (see window.c), but 
> Icons are using wNETWMGetIconName(Window*) to set the icon title. Yes, icon 
> titles are different between the window and the icon.
> 
> Running some applications, for example gitk, the window show title, but the 
> icon don't have title. We can use the same function in both icon and windows.
> 
> The change is easy:
> 
> 129 #ifdef NO_MINIWINDOW_TITLES
> 130         icon->show_title = 0;
> 131 #else
> 132         icon->show_title = 1;
> 133 #endif
> 134 
> 135 //      icon->icon_name = wNETWMGetIconName(wwin->client_win);
> 136         icon->icon_name = wNETWMGetWindowName(wwin->client_win);
> 137         if (icon->icon_name)
> 138                 wwin->flags.net_has_icon_title = 1;
> 139         else
> 
> Commented line should be removed, line 136 is new. Lines may differ, because 
> I have more patches running here.
> 
> The icons are now better, all with titles :-) The question is: Should we use 
> the window name in icons?

Perhaps, do something like "use the icon name", but if it is NULL, "use the 
window name"?
 
> What should we do with this code (wmspec.c)
> 
> 1464         } else if (event->atom == net_wm_window_type) {
> 1465                 updateWindowType(wwin);
> 1466         } else if (event->atom == net_wm_name) {
> 1467*                char *name = wNETWMGetWindowName(wwin->client_win);
> 1468*                wWindowUpdateName(wwin, name);
> 1469                 if (name)
> 1470                         wfree(name);
> 1471         } else if (event->atom == net_wm_icon_name) {
> 1472                 if (wwin->icon) {
> 1473*                        char *name = wNETWMGetIconName(wwin->client_win);
> 1474*                        wIconChangeTitle(wwin->icon, name);
> 1475                 }
> 
> See lines with "*".
> 
> Thanks,
> kix
> 
> -- 
> ||// //\\// Rodolfo "kix" Garcia
> ||\\// //\\ http://www.kix.es/
> 
> 
> -- 
> To unsubscribe, send mail to [email protected].

-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/


-- 
To unsubscribe, send mail to [email protected].

Reply via email to