Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h actions.c borders.c desktops.c ewmh.c hints.c iconify.c 


Log Message:
Update the client stacking list properly.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.256
retrieving revision 1.257
diff -u -3 -r1.256 -r1.257
--- E.h 28 Apr 2004 22:31:36 -0000      1.256
+++ E.h 30 Apr 2004 20:05:19 -0000      1.257
@@ -2055,6 +2055,7 @@
 void                EWMH_SetDesktopViewport(void);
 void                EWMH_SetWorkArea(void);
 void                EWMH_SetClientList(void);
+void                EWMH_SetClientStacking(void);
 void                EWMH_SetActiveWindow(const EWin * ewin);
 void                EWMH_SetWindowDesktop(const EWin * ewin);
 void                EWMH_SetWindowState(const EWin * ewin);
@@ -2233,6 +2234,7 @@
 void                HintsSetCurrentDesktop(void);
 void                HintsSetDesktopViewport(void);
 void                HintsSetClientList(void);
+void                HintsSetClientStacking(void);
 void                HintsSetActiveWindow(EWin * ewin);
 void                HintsSetWindowDesktop(EWin * ewin);
 void                HintsSetWindowArea(EWin * ewin);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/actions.c,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -3 -r1.155 -r1.156
--- actions.c   12 Apr 2004 08:28:32 -0000      1.155
+++ actions.c   30 Apr 2004 20:05:19 -0000      1.156
@@ -1615,7 +1615,9 @@
    ewin->skipwinlist = !(skip);
    ewin->skipfocus = !(skip);
    HintsSetWindowState(ewin);
-   HintsSetClientList();
+#if ENABLE_GNOME
+   GNOME_SetClientList();
+#endif
    RememberImportantInfoForEwin(ewin);
 
    EDBUG_RETURN(0);
@@ -1629,7 +1631,9 @@
 
    ewin->skiptask = !ewin->skiptask;
    HintsSetWindowState(ewin);
-   HintsSetClientList();
+#if ENABLE_GNOME
+   GNOME_SetClientList();
+#endif
    RememberImportantInfoForEwin(ewin);
 
    EDBUG_RETURN(0);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -3 -r1.172 -r1.173
--- borders.c   28 Apr 2004 22:31:36 -0000      1.172
+++ borders.c   30 Apr 2004 20:05:20 -0000      1.173
@@ -1955,6 +1955,7 @@
       Eprintf("RestackEwin %#10lx %s %#10lx\n", ewin->win,
              (xwc.stack_mode == Above) ? "Above" : "Below", xwc.sibling);
    XConfigureWindow(disp, ewin->win, value_mask, &xwc);
+   HintsSetClientStacking();
 
    if (Mode.mode == MODE_NONE)
      {
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -3 -r1.87 -r1.88
--- desktops.c  28 Apr 2004 22:13:46 -0000      1.87
+++ desktops.c  30 Apr 2004 20:05:21 -0000      1.88
@@ -1166,7 +1166,7 @@
    XRestackWindows(disp, wl, tot);
    ShowEdgeWindows();
    RaiseProgressbars();
-   HintsSetClientList();
+   HintsSetClientStacking();
 
    if (wl)
       Efree(wl);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- ewmh.c      10 Apr 2004 10:43:55 -0000      1.44
+++ ewmh.c      30 Apr 2004 20:05:22 -0000      1.45
@@ -362,38 +362,54 @@
 EWMH_SetClientList(void)
 {
    Window             *wl;
-   int                 i, nwin, num;
+   int                 i, num;
    EWin              **lst;
 
    EDBUG(6, "EWMH_SetClientList");
 
    /* Mapping order */
    lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN);
-   wl = NULL;
-   nwin = 0;
-   if (lst)
+   if (num > 0)
      {
-       wl = Emalloc(sizeof(Window) * num);
+       wl = Emalloc(num * sizeof(Window));
        for (i = 0; i < num; i++)
-          wl[nwin++] = lst[i]->client.win;
-       _ATOM_SET_WINDOW(_NET_CLIENT_LIST, root.win, wl, nwin);
-       Efree(lst);
+          wl[i] = lst[i]->client.win;
+       _ATOM_SET_WINDOW(_NET_CLIENT_LIST, root.win, wl, num);
+       Efree(wl);
      }
+   else
+     {
+       _ATOM_SET_WINDOW(_NET_CLIENT_LIST, root.win, NULL, 0);
+     }
+   if (lst)
+      Efree(lst);
 
-   /* Stacking order */
-   lst = (EWin **) EwinListGetStacking(&num);
-   /* FIXME: num must be unchanged here! Check! */
-   if (num != nwin)
-      Eprintf("*** ERROR: no=%d nn=%d\n", nwin, num);
-   if (num > nwin)
-      wl = Erealloc(wl, num * sizeof(Window));
-   nwin = 0;
-   for (i = num - 1; i >= 0; i--)
-      wl[nwin++] = lst[i]->client.win;
-   _ATOM_SET_WINDOW(_NET_CLIENT_LIST_STACKING, root.win, wl, nwin);
+   EDBUG_RETURN_;
+}
 
-   if (wl)
-      Efree(wl);
+void
+EWMH_SetClientStacking(void)
+{
+   Window             *wl;
+   int                 i, num;
+   EWin               *const *lst;
+
+   EDBUG(6, "EWMH_SetClientStacking");
+
+   /* Stacking order */
+   lst = EwinListGetStacking(&num);
+   if (num > 0)
+     {
+       wl = Emalloc(num * sizeof(Window));
+       for (i = 0; i < num; i++)
+          wl[i] = lst[num - i - 1]->client.win;
+       _ATOM_SET_WINDOW(_NET_CLIENT_LIST_STACKING, root.win, wl, num);
+       Efree(wl);
+     }
+   else
+     {
+       _ATOM_SET_WINDOW(_NET_CLIENT_LIST_STACKING, root.win, NULL, 0);
+     }
 
    EDBUG_RETURN_;
 }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/hints.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- hints.c     20 Mar 2004 15:49:05 -0000      1.18
+++ hints.c     30 Apr 2004 20:05:22 -0000      1.19
@@ -62,6 +62,17 @@
 #endif
 #if ENABLE_EWMH
    EWMH_SetClientList();
+   EWMH_SetClientStacking();
+#endif
+   EDBUG_RETURN_;
+}
+
+void
+HintsSetClientStacking(void)
+{
+   EDBUG(6, "HintsSetClientStacking");
+#if ENABLE_EWMH
+   EWMH_SetClientStacking();
 #endif
    EDBUG_RETURN_;
 }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -3 -r1.103 -r1.104
--- iconify.c   28 Apr 2004 22:31:37 -0000      1.103
+++ iconify.c   30 Apr 2004 20:05:22 -0000      1.104
@@ -255,7 +255,7 @@
                    }
               }
 #if ENABLE_GNOME
-            HintsSetClientList();
+            GNOME_SetClientList();
 #endif
             Efree(lst);
          }
@@ -348,7 +348,7 @@
                  e->iconified = 0;
               }
 #if ENABLE_GNOME
-            HintsSetClientList();
+            GNOME_SetClientList();
 #endif
             Efree(lst);
          }




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to