On 21/06/12 18:31, Carlos R. Mafra wrote:

> 
> We want to avoid having to consider the position of an appicon whose
> application has no_appicon set. The appicon is not "painted" so it
> does not appear on the screen. But if the appicon is still added to
> the list of application icons, the wArrangeIcons() function gets
> confused and ends up creating holes in the icon positions which
> correspond to the no_appicon apps.
> 
> Signed-off-by: Carlos R. Mafra <[email protected]>
> ---
>  src/appicon.c |   15 ++++++++++-----
>  1 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/src/appicon.c b/src/appicon.c
> index d236313..594721c 100644
> --- a/src/appicon.c
> +++ b/src/appicon.c
> @@ -248,12 +248,17 @@ static WAppIcon *wAppIconCreate(WWindow * leader_win)
>       aicon->yindex = -1;
>       aicon->xindex = -1;
>  
> -     aicon->prev = NULL;
> -     aicon->next = scr->app_icon_list;
> -     if (scr->app_icon_list)
> -             scr->app_icon_list->prev = aicon;
> +     /* When no_appicon is set we want to avoid having it on the list
> +      * because otherwise there will be a hole when the icons are
> +      * arranged with wArrangeIcons() */
> +     if (!WFLAGP(leader_win, no_appicon)) {
> +             aicon->prev = NULL;
> +             aicon->next = scr->app_icon_list;
> +             if (scr->app_icon_list)
> +                     scr->app_icon_list->prev = aicon;
>  
> -     scr->app_icon_list = aicon;
> +             scr->app_icon_list = aicon;
> +     }
>  
>       if (leader_win->wm_class)
>               aicon->wm_class = wstrdup(leader_win->wm_class);



About this patch I am not sure.

I am not sure if is better add the icon in the app_icon_list and use it
if the no_appflag is set (see my last patch) or don't include it in the
app_icon_list and then the functions that use this list don't look the
icons with no_appicon (your patch).

We should check if the app_icon_list is used with other pourposes, like
for example switchpanel, or only to show the appicons. We should check
too whats happend if we set the no_appicon flag, and later, we remove
the flag (for example in the attributes window), because if the icon is
not re-created, then we cannot find the icon in the list.

I will try to work in this part tomorrow. Today I can't.

Thanks for your interest in the icon stuff!

Saludos
kix

PS. I need check more my patch, is not finished. Feel free to continue
with it if you want.






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

Reply via email to