On Thu, 21 Jun 2012 at 14:26:42 +0200, Rodolfo kix Garcia wrote:
> El 21.06.2012 13:29, Carlos R. Mafra escribió:
> >On Thu, 21 Jun 2012 at 0:20:50 +0200, Rodolfo kix Garcia wrote:
> >
> >>With the new code, the wArrangeIcon checks if wwapp->icon
> >>exists, If is
> >>null, then doesn't exists and for this reason the icon is not
> >>added in
> >>the icon list. But with my patch, always exists, therefore,
> >>wwapp->icon
> >>is always true and then the icon is added, but, the icon is not
> >>mapped
> >>in X11, then you cannot see it.
> >
> >Ok, you seem to have understood the problem, but your patch last
> >night
> >didn't fix it. Strange. I will check that again.
>
> Ok. Thanks a lot. Please, test it again and if you find a
> reproducible problem I can check it here and try to write a better
> patch.
The patch below fixes it for me. It seems like the problem exists because
as the icon is always created no matter if no_appicon is set or not, it
is also added to the list of appicons.
So when the wArrangeIcons() is called it finds a position to place
all the appicons in that list, including the "phantom" no_appicons.
I have to think more about why your patch to check the no_appicon
property in wArrangeIcons() does not work though (I double checked it
this afternoon).
What do you think?
---
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);
--
1.7.7
--
To unsubscribe, send mail to [email protected].