From: "Rodolfo García Peñas (kix)" <k...@kix.es>

This patch removes the wIconDestroy and the window always has icon.
This patch doesn't create the icon at the window creation! so yet
WWindow icon could be null.

This patch also adds this bug when the window is removed:

wmaker(RemoveFromStackList(stacking.c:567)): \
warning: RemoveFromStackingList(): window not in list

Because the stacking is not updated correctly.
---
 src/actions.c |    6 +-----
 src/wmspec.c  |   16 +---------------
 2 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/src/actions.c b/src/actions.c
index a79de8a..e1e6aaa 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1318,12 +1318,8 @@ void wDeiconifyWindow(WWindow *wwin)
        }
 
        if (!wPreferences.disable_miniwindows && wwin->icon != NULL
-           && !wwin->flags.net_handle_icon) {
+           && !wwin->flags.net_handle_icon)
                RemoveFromStackList(wwin->icon->core);
-               /*    removeIconGrabs(wwin->icon); */
-               wIconDestroy(wwin->icon);
-               wwin->icon = NULL;
-       }
 
        if (!netwm_hidden) {
                XUngrabServer(dpy);
diff --git a/src/wmspec.c b/src/wmspec.c
index 28efc20..d620855 100644
--- a/src/wmspec.c
+++ b/src/wmspec.c
@@ -1090,18 +1090,6 @@ static void doStateAtom(WWindow *wwin, Atom state, int 
set, Bool init)
        }
 }
 
-static void removeIcon(WWindow *wwin)
-{
-       if (wwin->icon == NULL)
-               return;
-       if (wwin->flags.miniaturized && wwin->icon->mapped) {
-               XUnmapWindow(dpy, wwin->icon->core->window);
-               RemoveFromStackList(wwin->icon->core);
-               wIconDestroy(wwin->icon);
-               wwin->icon = NULL;
-       }
-}
-
 static Bool handleWindowType(WWindow *wwin, Atom type, int *layer)
 {
        Bool ret = True;
@@ -1319,9 +1307,7 @@ static Bool updateNetIconInfo(WWindow *wwin)
        }
 
        if (wwin->flags.miniaturized && old_state != 
wwin->flags.net_handle_icon) {
-               if (wwin->flags.net_handle_icon) {
-                       removeIcon(wwin);
-               } else {
+               if (!wwin->flags.net_handle_icon) {
                        wwin->flags.miniaturized = False;
                        wwin->flags.skip_next_animation = True;
                        wIconifyWindow(wwin);
-- 
1.7.10.4


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

Reply via email to