On Fri, 25 Jan 2013, BALATON Zoltan escribió:

> On Fri, 25 Jan 2013, Carlos R. Mafra wrote:
> >On Fri, 25 Jan 2013 at  1:06:58 +0100, Rodolfo García Peñas wrote:
> >>I changed the behavior for the winspector. Can you test it now?
> >>
> >>More testers are welcome. If the patch is ok, I will write the commit info.
> >
> >I'm a bit lost about which behavior is being fixed. What is the test
> >case to aim for?
> >
> >On the other hand, if Zoltan says it fixes his issues, I'll apply
> >without testing it myself :-)
> 
> I don't have time to test it now but I've described the problem,
> testing procedure and provided a test case in the thread starting at
> 
> http://lists.windowmaker.org/dev/msg04395.html
> 
> The test case is here:
> http://lists.windowmaker.org/dev/msg04396.html
> (Should show a white rectangle in the app icon which is the icon window.)
> 
> The procedure to test Ignore app icon is here:
> http://lists.windowmaker.org/dev/msg04452.html
> 
> Hope this helps.
> 
> Regards,
> BALATON Zoltan

Hi Zoltan,

I have some patches here about the icon image, related to the wmicontest tool.

Yes, you are right, the behavior of using the window_icon as dock icon should 
be included. But (nothing matters before the "but" ;-) ), should we include it 
as other icon image source option??? See this code:

static void set_icon_image_from_client(WIcon *icon)
{
        WWindow *wwin = NULL;

        if (icon && icon->owner)
                wwin = icon->owner;

        if (icon->icon_win != None) {
                /* Get the Pixmap from the WIcon */
                get_rimage_icon_from_icon_win(icon);
        } else if (wwin && wwin->net_icon_image) {
                /* Use _NET_WM_ICON icon */
                get_rimage_icon_from_x11(icon);
        } else if (wwin && wwin->wm_hints && (wwin->wm_hints->flags & 
IconPixmapHint)) {
                /* Get the Pixmap from the wm_hints, else, from the user */
                unset_icon_image(icon);
                icon->file_image = get_rimage_icon_from_wm_hints(icon);
                if (!icon->file_image)
                        get_rimage_icon_from_user_icon(icon);
        } else if (wwin && wwin->wm_hints && (wwin->wm_hints->flags & 
IconWindowHint)) {
                if (wwin->client_win == wwin->main_window) {
                        WApplication *wapp;
                        /* do not let miniwindow steal app-icon's icon window */
                        wapp = wApplicationOf(wwin->client_win);
                        if (!wapp || wapp->app_icon == NULL)
                                icon->icon_win = wwin->wm_hints->icon_window;
                } else {
                        icon->icon_win = wwin->wm_hints->icon_window;
                }
        } else {
                /* Get the Pixmap from the user */
                get_rimage_icon_from_user_icon(icon);
        }
}

These lines were in "wIconUpdate", and I added (see 3rd "else"), using the code 
in the icon create for wwindow (and removing it from that function). Now the 
behavior is better. Xfig runs without problem, and in wmicontest, the 
icon_window is used, but we can select an icon using the winspector (now you 
can't). BUT (again), if the icon is set in winspector, then the icon_image is 
overriden. IMO, this new code is better, but... I would like to know your 
oppinion before send the patches.

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


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to