Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h actions.c areas.c arrange.c borders.c comms.c desktops.c 
        evhandlers.c finders.c focus.c icccm.c iconify.c ipc.c menus.c 
        pager.c session.c settings.c size.c stacking.c warp.c 


Log Message:
Improve on (click-to-) focus.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -3 -r1.234 -r1.235
--- E.h 26 Mar 2004 21:42:03 -0000      1.234
+++ E.h 1 Apr 2004 22:41:19 -0000       1.235
@@ -2536,10 +2536,12 @@
 void                EwinListDelete(EWinList * ewl, EWin * ewin);
 int                 EwinListRaise(EWinList * ewl, EWin * ewin, int mode);
 int                 EwinListLower(EWinList * ewl, EWin * ewin, int mode);
+EWin               *const *EwinListGet(EWinList * ewl, int *num);
 EWin               *const *EwinListGetForDesktop(int desk, int *num);
-EWin               *const *EwinListGetStacking(int *num);
 
-#define EwinListGet EwinListGetStacking
+#define EwinListGetFocus(pnum) EwinListGet(&EwinListFocus, pnum)
+#define EwinListGetStacking(pnum) EwinListGet(&EwinListStack, pnum)
+#define EwinListGetAll EwinListGetStacking
 int                 EwinListStackingRaise(EWin * ewin);
 int                 EwinListStackingLower(EWin * ewin);
 int                 EwinListFocusRaise(EWin * ewin);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/actions.c,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -3 -r1.150 -r1.151
--- actions.c   26 Mar 2004 21:21:44 -0000      1.150
+++ actions.c   1 Apr 2004 22:41:19 -0000       1.151
@@ -1257,7 +1257,7 @@
             method = ARRANGE_BY_POSITION;
          }
      }
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    if (lst)
      {
        fixed = NULL;
@@ -2357,7 +2357,7 @@
    y = 0;
    sscanf((char *)params, "%i %i", &x, &y);
 
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        if ((lst[i]->desktop == desks.current) && (!lst[i]->sticky)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/areas.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- areas.c     26 Mar 2004 21:21:45 -0000      1.65
+++ areas.c     1 Apr 2004 22:41:20 -0000       1.66
@@ -96,7 +96,7 @@
 
    SetAreaSize(ax, ay);
 
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        if ((!(lst[i]->sticky)) && (!(lst[i]->fixedpos)))
@@ -283,7 +283,7 @@
    desks.desk[desks.current].current_area_y = ay;
 
    /* move all the windows around */
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    if (Conf.desks.slidein)
      {
        int                 wnum = 0;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/arrange.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -3 -r1.66 -r1.67
--- arrange.c   26 Mar 2004 21:21:45 -0000      1.66
+++ arrange.c   1 Apr 2004 22:41:20 -0000       1.67
@@ -829,7 +829,7 @@
    fixed = NULL;
    ret = NULL;
 
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    if ((lst) && (num > 0))
      {
        fixed = Emalloc(sizeof(RectBox) * num);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -3 -r1.155 -r1.156
--- borders.c   26 Mar 2004 21:51:22 -0000      1.155
+++ borders.c   1 Apr 2004 22:41:20 -0000       1.156
@@ -118,7 +118,7 @@
 
    EDBUG(5, "SetEInfoOnAll");
 
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
       ICCCM_SetEInfo(lst[i]);
    ICCCM_SetMainEInfo();
@@ -404,7 +404,7 @@
 
             if (!ewin2)
               {
-                 lst = EwinListGet(&num);
+                 lst = EwinListGetAll(&num);
                  for (i = 0; i < num; i++)
                    {
                       if ((lst[i]->iconified) ||
@@ -3229,7 +3229,7 @@
    EWin               *const *ewins;
    int                 i, j, num, used = 0;
 
-   ewins = EwinListGet(&num);
+   ewins = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        for (j = 0; j < ewins[i]->border->num_winparts; j++)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/comms.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- comms.c     26 Mar 2004 21:21:45 -0000      1.56
+++ comms.c     1 Apr 2004 22:41:20 -0000       1.57
@@ -1577,7 +1577,7 @@
                Conf.desks.num = 1;
             else if (Conf.desks.num > ENLIGHTENMENT_CONF_NUM_DESKTOPS)
                Conf.desks.num = ENLIGHTENMENT_CONF_NUM_DESKTOPS;
-            lst = EwinListGet(&num);
+            lst = EwinListGetAll(&num);
             for (i = 0; i < num; i++)
               {
                  if (lst[i]->desktop >= Conf.desks.num)
@@ -1818,7 +1818,7 @@
        EWin               *const *lst;
        int                 i, num;
 
-       lst = EwinListGet(&num);
+       lst = EwinListGetAll(&num);
        for (i = 0; i < num; i++)
          {
             if (!lst[i]->icccm.wm_name)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -3 -r1.77 -r1.78
--- desktops.c  26 Mar 2004 21:21:45 -0000      1.77
+++ desktops.c  1 Apr 2004 22:41:20 -0000       1.78
@@ -129,7 +129,7 @@
    else if (Conf.desks.num > ENLIGHTENMENT_CONF_NUM_DESKTOPS)
       Conf.desks.num = ENLIGHTENMENT_CONF_NUM_DESKTOPS;
 
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        if (lst[i]->desktop >= Conf.desks.num)
@@ -1411,7 +1411,7 @@
    desks.desk[desk].x = x;
    desks.desk[desk].y = y;
 
-   lst = EwinListGet(&n);
+   lst = EwinListGetAll(&n);
    for (i = 0; i < n; i++)
       if (lst[i]->desktop == desk)
         ICCCM_Configure(lst[i]);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/evhandlers.c,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -3 -r1.157 -r1.158
--- evhandlers.c        20 Mar 2004 15:49:05 -0000      1.157
+++ evhandlers.c        1 Apr 2004 22:41:21 -0000       1.158
@@ -586,8 +586,9 @@
 }
 
 void
-HandleFocusIn(XEvent * ev)
+HandleFocusIn(XEvent * ev __UNUSED__)
 {
+#if 0
    Window              win = ev->xfocus.window;
    EWin               *ewin;
 
@@ -603,11 +604,13 @@
      }
 
    EDBUG_RETURN_;
+#endif
 }
 
 void
-HandleFocusOut(XEvent * ev)
+HandleFocusOut(XEvent * ev __UNUSED__)
 {
+#if 0
    Window              win = ev->xfocus.window;
    EWin               *ewin;
 
@@ -628,6 +631,7 @@
 
  done:
    EDBUG_RETURN_;
+#endif
 }
 
 void
@@ -659,9 +663,6 @@
 
    EForgetWindow(disp, win);
 
-   if (win == Mode.context_win)
-      Mode.context_win = 0;
-
    ewin = RemoveItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
    if (ewin)
      {
@@ -683,6 +684,10 @@
    EWin               *ewin;
 
    EDBUG(5, "HandleUnmap");
+
+   if (win == Mode.context_win)
+      Mode.context_win = 0;
+
    ewin = FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
    if (ewin)
      {
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/finders.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- finders.c   26 Mar 2004 21:21:46 -0000      1.28
+++ finders.c   1 Apr 2004 22:41:21 -0000       1.29
@@ -29,7 +29,7 @@
    int                 i, num;
 
    EDBUG(6, "FindEwinByBase");
-   ewins = EwinListGet(&num);
+   ewins = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        if (win == ewins[i]->win)
@@ -46,7 +46,7 @@
 
    EDBUG(6, "FindEwinByChildren");
 
-   ewins = EwinListGet(&num);
+   ewins = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        if ((win == ewins[i]->client.win) || (win == ewins[i]->win_container))
@@ -79,7 +79,7 @@
    if (len <= 0)
       goto done;
 
-   ewins = EwinListGet(&num);
+   ewins = EwinListGetAll(&num);
    if (ewins == NULL)
       goto done;
 
@@ -117,7 +117,7 @@
 
    EDBUG(6, "FindEwinByDecoration");
 
-   ewins = EwinListGet(&num);
+   ewins = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        for (j = 0; j < ewins[i]->border->num_winparts; j++)
@@ -174,7 +174,7 @@
 
    EDBUG(6, "FindEwinByMenu");
 
-   ewins = EwinListGet(&num);
+   ewins = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        if (ewins[i]->menu == m)
@@ -345,7 +345,7 @@
 
    EDBUG(6, "ListTransientsFor");
 
-   ewins = EwinListGet(&n);
+   ewins = EwinListGetAll(&n);
    j = 0;
    for (i = 0; i < n; i++)
      {
@@ -368,7 +368,7 @@
 
    EDBUG(6, "ListGroupMembers");
 
-   ewins = EwinListGet(&n);
+   ewins = EwinListGetAll(&n);
    j = 0;
    for (i = 0; i < n; i++)
      {
@@ -391,7 +391,7 @@
 
    EDBUG(6, "FindEwinByDialog");
 
-   ewins = EwinListGet(&num);
+   ewins = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        if (ewins[i]->dialog == d)
@@ -409,7 +409,7 @@
 
    EDBUG(6, "FindADialog");
 
-   ewins = EwinListGet(&num);
+   ewins = EwinListGetAll(&num);
    for (i = n = 0; i < num; i++)
      {
        if (ewins[i]->dialog)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -3 -r1.60 -r1.61
--- focus.c     26 Mar 2004 21:21:46 -0000      1.60
+++ focus.c     1 Apr 2004 22:41:21 -0000       1.61
@@ -45,7 +45,7 @@
 static EWin        *
 FocusEwinSelect(void)
 {
-   EWin              **lst, *ewin = NULL;
+   EWin               *const *lst, *ewin = NULL;
    int                 num, i;
 
    switch (Conf.focus.mode)
@@ -56,7 +56,7 @@
        ewin = GetEwinPointerInClient();
        break;
      case MODE_FOCUS_CLICK:
-       lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN);
+       lst = EwinListGetFocus(&num);
        for (i = 0; i < num; i++)
          {
             if (!FocusEwinValid(lst[i]))
@@ -64,8 +64,6 @@
             ewin = lst[i];
             break;
          }
-       if (lst)
-          Efree(lst);
        break;
      }
 
@@ -73,7 +71,7 @@
 }
 
 static void
-AutoraiseTimeout(int val, void *data)
+AutoraiseTimeout(int val, void *data __UNUSED__)
 {
    EWin               *ewin;
 
@@ -83,28 +81,23 @@
    ewin = FindItem("", val, LIST_FINDBY_ID, LIST_TYPE_EWIN);
    if (ewin)
       RaiseEwin(ewin);
-
-   return;
-   data = NULL;
 }
 
 static void
-ReverseTimeout(int val, void *data)
+ReverseTimeout(int val, void *data __UNUSED__)
 {
    EWin               *ewin;
 
-   ewin = RemoveItem("EWIN", val, LIST_FINDBY_ID, LIST_TYPE_EWIN);
+   ewin = FindItem("", val, LIST_FINDBY_ID, LIST_TYPE_EWIN);
    if (ewin)
-      AddItem(ewin, "EWIN", ewin->client.win, LIST_TYPE_EWIN);
-
-   return;
-   data = NULL;
+      EwinListRaise(&EwinListFocus, ewin, 0);
 }
 
 static void
 FocusCycle(int inc)
 {
-   EWin              **lst0, **lst, *ewin;
+   EWin               *const *lst0;
+   EWin              **lst, *ewin;
    int                 i, num0, num, ax, ay;
 
    EDBUG(5, "FocusCycle");
@@ -115,7 +108,7 @@
 
    GetCurrentArea(&ax, &ay);
 
-   lst0 = (EWin **) ListItemType(&num0, LIST_TYPE_EWIN);
+   lst0 = EwinListGetFocus(&num0);
    if (lst0 == NULL)
       EDBUG_RETURN_;
 
@@ -131,7 +124,6 @@
             lst[num - 1] = ewin;
          }
      }
-   Efree(lst0);
 
    if (lst == NULL)
       EDBUG_RETURN_;
@@ -173,13 +165,24 @@
        XGrabButton(disp, AnyButton, AnyModifier, ewin->win_container,
                    False, ButtonPressMask, GrabModeSync, GrabModeAsync,
                    None, None);
+/*     printf("FocusEwinSetGrabs: %#lx grab\n", ewin->client.win); */
      }
    else
      {
        XUngrabButton(disp, AnyButton, AnyModifier, ewin->win_container);
+/*     printf("FocusEwinSetGrabs: %#lx ungrab\n", ewin->client.win); */
      }
 }
 
+static void
+FocusEwinSetActive(EWin * ewin, int active)
+{
+   ewin->active = active;
+   DrawEwin(ewin);
+
+   FocusEwinSetGrabs(ewin);
+}
+
 void
 FocusFix(void)
 {
@@ -188,7 +191,7 @@
 
    EDBUG(5, "FocusFix");
 
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        ewin = lst[i];
@@ -312,11 +315,16 @@
           NULL);
 
    SoundPlay("SOUND_FOCUS_SET");
-   EwinListFocusRaise(ewin);
  done:
+   /* Unset old focus window (if any) highlighting */
+   if (Mode.focuswin)
+      FocusEwinSetActive(Mode.focuswin, 0);
    ICCCM_Cmap(ewin);
    ICCCM_Focus(ewin);
    Mode.focuswin = ewin;
+   /* Set new focus window (if any) highlighting */
+   if (Mode.focuswin)
+      FocusEwinSetActive(Mode.focuswin, 1);
 
    EDBUG_RETURN_;
 }
@@ -335,15 +343,14 @@
    /* we are about to flip desktops or areas - disable enter and leave events
     * temporarily */
 
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        ewin = lst[i];
 
        XSelectInput(disp, ewin->win,
-                    FocusChangeMask | SubstructureNotifyMask |
-                    SubstructureRedirectMask | PropertyChangeMask |
-                    ResizeRedirectMask);
+                    SubstructureNotifyMask | SubstructureRedirectMask |
+                    PropertyChangeMask | ResizeRedirectMask);
 
        if (ewin->pager)
          {
@@ -396,15 +403,14 @@
       return;
 
    /* we flipped - re-enable enter and leave events */
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        ewin = lst[i];
 
        XSelectInput(disp, ewin->win,
-                    FocusChangeMask | SubstructureNotifyMask |
-                    SubstructureRedirectMask | EnterWindowMask |
-                    LeaveWindowMask | PointerMotionMask |
+                    SubstructureNotifyMask | SubstructureRedirectMask |
+                    EnterWindowMask | LeaveWindowMask | PointerMotionMask |
                     PropertyChangeMask | ResizeRedirectMask |
                     ButtonPressMask | ButtonReleaseMask);
 
@@ -470,10 +476,22 @@
 void
 FocusHandleEnter(XEvent * ev)
 {
+   Window              win = ev->xcrossing.window;
    EWin               *ewin;
 
    EDBUG(5, "FocusHandleEnter");
 
+   /* Entering root may mean entering this screen */
+   if (win == root.win &&
+       (ev->xcrossing.mode == NotifyNormal &&
+       ev->xcrossing.detail != NotifyInferior))
+     {
+       ewin = FocusEwinSelect();
+       if (ewin)
+          FocusToEWin(ewin, FOCUS_DESK_ENTER);
+       goto done;
+     }
+
    ewin = GetEwinByCurrentPointer();
 
    Mode.mouse_over_win = ewin;
@@ -495,8 +513,8 @@
        break;
      }
 
+ done:
    EDBUG_RETURN_;
-   ev = NULL;
 }
 
 void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/icccm.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- icccm.c     26 Mar 2004 21:21:46 -0000      1.56
+++ icccm.c     1 Apr 2004 22:41:21 -0000       1.57
@@ -772,7 +772,7 @@
             EWin               *const *lst;
             int                 lnum, ok = 1;
 
-            lst = EwinListGet(&lnum);
+            lst = EwinListGetAll(&lnum);
             for (i = 0; i < lnum; i++)
               {
                  if ((lst[i] != ewin)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -3 -r1.97 -r1.98
--- iconify.c   26 Mar 2004 21:21:46 -0000      1.97
+++ iconify.c   1 Apr 2004 22:41:21 -0000       1.98
@@ -2267,7 +2267,7 @@
           IconboxShow(ibl[i]);
        Efree(ibl);
      }
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        if (lst[i]->client.start_iconified)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -3 -r1.147 -r1.148
--- ipc.c       26 Mar 2004 21:42:03 -0000      1.147
+++ ipc.c       1 Apr 2004 22:41:21 -0000       1.148
@@ -2587,7 +2587,7 @@
        EWin               *const *lst;
        int                 num, i;
 
-       lst = EwinListGet(&num);
+       lst = EwinListGetAll(&num);
        if (!strcmp(params, "pagers"))
          {
             for (i = 0; i < num; i++)
@@ -3470,7 +3470,7 @@
    int                 num, i;
    char                none[] = "-NONE-";
 
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    if (lst)
      {
        for (i = 0; i < num; i++)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -3 -r1.115 -r1.116
--- menus.c     26 Mar 2004 21:21:47 -0000      1.115
+++ menus.c     1 Apr 2004 22:41:22 -0000       1.116
@@ -93,7 +93,7 @@
 
    EDBUG(6, "FindEwinSpawningMenu");
 
-   ewins = EwinListGet(&num);
+   ewins = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        if (ewins[i]->shownmenu == m->win)
@@ -1768,7 +1768,7 @@
    m = MenuCreate(name);
    m->style = ms;
 
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        if ((!lst[i]->menu) && (!lst[i]->pager) && (!lst[i]->skipwinlist)
@@ -1799,7 +1799,7 @@
    m = MenuCreate(name);
    m->style = ms;
 
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        if (((lst[i]->desktop == desk) || (lst[i]->sticky))
@@ -1832,7 +1832,7 @@
 
    m = MenuCreate(name);
    m->style = ms;
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    for (j = 0; j < Conf.desks.num; j++)
      {
        mm = MenuCreate("__SUBMENUDESK_E");
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -3 -r1.79 -r1.80
--- pager.c     26 Mar 2004 21:21:47 -0000      1.79
+++ pager.c     1 Apr 2004 22:41:22 -0000       1.80
@@ -1492,7 +1492,7 @@
 
    HIQ = onoff;
 
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        lst[i]->mini_w = 0;
@@ -1522,7 +1522,7 @@
 
    Conf.pagers.snap = onoff;
 
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    for (i = 0; i < num; i++)
      {
        lst[i]->mini_w = 0;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/session.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -3 -r1.62 -r1.63
--- session.c   26 Mar 2004 21:21:47 -0000      1.62
+++ session.c   1 Apr 2004 22:41:22 -0000       1.63
@@ -212,7 +212,7 @@
    FILE               *f;
    char                s[4096], ss[4096];
 
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    if (lst)
      {
        Etmp(s);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/settings.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -3 -r1.103 -r1.104
--- settings.c  26 Mar 2004 21:21:47 -0000      1.103
+++ settings.c  1 Apr 2004 22:41:22 -0000       1.104
@@ -4672,7 +4672,7 @@
 
    /* there's a much more efficient way of doing this, but this will work
     * for now */
-   lst = EwinListGet(&num);
+   lst = EwinListGetAll(&num);
    rd_ewin_list = Emalloc(sizeof(RememberWinList *) * (num + 1));
    ri = 0;
    if ((lst) && (num > 0))
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/size.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- size.c      26 Mar 2004 21:21:47 -0000      1.34
+++ size.c      1 Apr 2004 22:41:22 -0000       1.35
@@ -102,7 +102,7 @@
          }
        else
          {
-            lst = EwinListGet(&num);
+            lst = EwinListGetAll(&num);
          }
 
        if (direction & MAX_VER)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/stacking.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- stacking.c  26 Mar 2004 21:21:47 -0000      1.5
+++ stacking.c  1 Apr 2004 22:41:22 -0000       1.6
@@ -182,10 +182,10 @@
 EWinList            EwinListStack = { "Stack", 0, 0, NULL };
 
 EWin               *const *
-EwinListGetStacking(int *num)
+EwinListGet(EWinList * ewl, int *num)
 {
-   *num = EwinListStack.nwins;
-   return EwinListStack.list;
+   *num = ewl->nwins;
+   return ewl->list;
 }
 
 EWin               *const *
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/warp.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- warp.c      20 Mar 2004 15:49:05 -0000      1.39
+++ warp.c      1 Apr 2004 22:41:22 -0000       1.40
@@ -81,7 +81,8 @@
 void
 WarpFocus(int delta)
 {
-   EWin              **lst0, **lst, *ewin;
+   EWin               *const *lst0;
+   EWin              **lst, *ewin;
    int                 i, num0, num;
 
    EDBUG(5, "WarpFocus");
@@ -92,37 +93,32 @@
    lst = (EWin **) ListItemType(&num, LIST_TYPE_WARP_RING);
    if (!lst)
      {
-       lst0 = (EWin **) ListItemType(&num0, LIST_TYPE_EWIN);
+       lst0 = EwinListGetFocus(&num0);
        num = 0;
        lst = NULL;
-       if (lst0)
+       for (i = num0 - 1; i >= 0; --i)
          {
-            for (i = num0 - 1; i >= 0; --i)
-              {
-                 ewin = lst0[i];
-                 if (          /* Either visible or iconified */
-                       ((EwinIsOnScreen(ewin)) || (ewin->iconified))
-                       /* Exclude windows that explicitely say so */
-                       && (!ewin->skipfocus)
-                       /* Keep shaded windows if conf say so */
-                       && ((!ewin->shaded) || (Conf.warplist.warpshaded))
-                       /* Keep sticky windows if conf say so */
-                       && ((!ewin->sticky) || (Conf.warplist.warpsticky))
-                       /* Keep iconified windows if conf say so */
-                       && ((!ewin->iconified) || (Conf.warplist.warpiconified))
-                       /*&& (ewin->client.mwm_decor_title) &&
-                        * (ewin->client.mwm_decor_border) */
-                    )
-                    AddItem(ewin, "", 0, LIST_TYPE_WARP_RING);
-              }
+            ewin = lst0[i];
+            if (               /* Either visible or iconified */
+                  ((EwinIsOnScreen(ewin)) || (ewin->iconified))
+                  /* Exclude windows that explicitely say so */
+                  && (!ewin->skipfocus)
+                  /* Keep shaded windows if conf say so */
+                  && ((!ewin->shaded) || (Conf.warplist.warpshaded))
+                  /* Keep sticky windows if conf say so */
+                  && ((!ewin->sticky) || (Conf.warplist.warpsticky))
+                  /* Keep iconified windows if conf say so */
+                  && ((!ewin->iconified) || (Conf.warplist.warpiconified))
+                  /*&& (ewin->client.mwm_decor_title) &&
+                   * (ewin->client.mwm_decor_border) */
+               )
+               AddItem(ewin, "", 0, LIST_TYPE_WARP_RING);
          }
        MoveItemToListBottom(GetFocusEwin(), LIST_TYPE_WARP_RING);
        lst = (EWin **) ListItemType(&num, LIST_TYPE_WARP_RING);
        warpFocusIndex = num - 1;
      }
 
-   ewin = NULL;
-
    if (lst)
      {
        warpFocusIndex = (warpFocusIndex + num + delta) % num;
@@ -252,9 +248,8 @@
 
    for (i = 0; i < warptitles_num; i++)
      {
-       if (!FindItem
-           ((char *)warptitles_ewin[i], 0, LIST_FINDBY_POINTER,
-            LIST_TYPE_EWIN))
+       if (!FindItem((char *)warptitles_ewin[i], 0, LIST_FINDBY_POINTER,
+                     LIST_TYPE_EWIN))
           warptitles_ewin[i] = NULL;
        if (warptitles_ewin[i])
          {




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to