On 2012-11-29 11:03, BALATON Zoltan wrote:
On Thu, 29 Nov 2012, Rodolfo Garc?a Pe?as wrote:
This patch avoid to save the icon name in the configuration file
if the flag "Ignore client suplied icon" is not selected.
Sorry but if the icon set by the user is not used when Ignore flag is
not set then why do we have this option at all?
Yes, you are right. We have four options:
1. ignore flag + file set
2. no ignore flag + file set
3. ignore flag + no file set
4. no ignore flag + no file set
Option 1 is clear, we provide a new icon and ignore the supplied icon
by the client.
Option 4 is clear, we use the client supplied icon and the icon
provided is not used.
But, what about options 2 and 3?
If we provide icon, should the flag ignored?
If we check the flag, should the file ignored?
Should we can remove the check? is the work done by the text field? If
the text is empty, should the icon provided by the client used?
+ /* If the "Ignore client suplied icon is not selected" flag was
not set,
+ * then, don't save the icon filename. If saved, the application
will use
+ * that icon, even the flag is not set. */
It's intended that the app will use the icon the user has set. But
some applications (like xfig) use an icon window which will override
the set icon. I think the Ignore flag was meant to counter this and
it's not normally needed for apps which only specify a pixmap icon to
use the user specified icon. This patch would break this behaviour.
IMO we are doing something wrong with these applications (like xfig).
Why these applications have that behaviour? Xfig don't use title in the
miniwindow, sets their own icon,...
Again, if we remove these lines in create_for_wwindow (icon.c) xfig
runs like other applications. IMHO, these lines should be removed:
121 if (wwin->wm_hints && (wwin->wm_hints->flags & IconWindowHint))
{
122 if (wwin->client_win == wwin->main_window) {
123 WApplication *wapp;
124 /* do not let miniwindow steal app-icon's icon
window */
125 wapp = wApplicationOf(wwin->client_win);
126 if (!wapp || wapp->app_icon == NULL)
127 icon->icon_win =
wwin->wm_hints->icon_window;
128 } else {
129 icon->icon_win = wwin->wm_hints->icon_window;
130 }
131 }
Try it, and you will see that xfig has a common behaviour. The
application has icon, the title,... These lines override the common icon
management. Probably we should check the icon behaviour to see if the
current code includes the idea of these lines, but, IMO this lines
breaks the flow for icon management, creating a shortcut with a
different flow and should be removed.
Regards,
BALATON Zoltan
Again, thanks a lot for your comments. Please, try the patches, I think
now is better.
Cheers,
--
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.