kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=08b70658d38996972a3760e93ecfd1746841acad

commit 08b70658d38996972a3760e93ecfd1746841acad
Author: Kim Woelders <[email protected]>
Date:   Sun Apr 3 19:32:53 2022 +0200

    stacking: Hold all objects in the order list
    
    I.e. not just the EWins.
---
 src/eobj.c     | 6 +++++-
 src/ewins.c    | 2 --
 src/stacking.c | 8 ++++----
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/eobj.c b/src/eobj.c
index e17f2dfd..4b3d8a5f 100644
--- a/src/eobj.c
+++ b/src/eobj.c
@@ -244,7 +244,10 @@ EobjInit(EObj * eo, int type, Win win, int x, int y, int 
w, int h,
    ECompMgrWinNew(eo);
 #endif
    if (EobjGetXwin(eo) != WinGetXwin(VROOT))
-      EobjListStackAdd(eo, 1);
+     {
+       EobjListOrderAdd(eo);
+       EobjListStackAdd(eo, 1);
+     }
 
    if (EDebug(EDBUG_TYPE_EWINS))
       Eprintf("%s: %#x %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
@@ -257,6 +260,7 @@ EobjFini(EObj * eo)
       Eprintf("%s: %#x %s\n", __func__, EobjGetXwin(eo), EobjGetName(eo));
 
    EobjListStackDel(eo);
+   EobjListOrderDel(eo);
 
 #if USE_COMPOSITE
    if (!eo->external)
diff --git a/src/ewins.c b/src/ewins.c
index a686ba88..ac99126e 100644
--- a/src/ewins.c
+++ b/src/ewins.c
@@ -248,7 +248,6 @@ EwinManage(EWin * ewin)
                              ewin);
 
        EobjListFocusAdd(&ewin->o, 1);
-       EobjListOrderAdd(&ewin->o);
      }
 
 #if USE_CONTAINER_WIN
@@ -425,7 +424,6 @@ EwinDestroy(EWin * ewin)
    Efree(lst);
 
    EwinCleanup(ewin);
-   EobjListOrderDel(&ewin->o);
    EobjListFocusDel(&ewin->o);
    EoFini(ewin);
 
diff --git a/src/stacking.c b/src/stacking.c
index 5cb70b90..667d0368 100644
--- a/src/stacking.c
+++ b/src/stacking.c
@@ -293,7 +293,7 @@ EobjListTypeCount(const EobjList * eol, int type)
 
 static EobjList     EobjListStack = EOBJ_LIST("Stack", 1);
 static EobjList     EwinListFocus = EOBJ_LIST("Focus", 0);
-static EobjList     EwinListOrder = EOBJ_LIST("Order", 0);
+static EobjList     EobjListOrder = EOBJ_LIST("Order", 0);
 
 static EObj        *const *
 EobjListGet(EobjList * eol, int *num)
@@ -500,17 +500,17 @@ EwinListStackIsRaised(const EWin * ewin)
 void
 EobjListOrderAdd(EObj * eo)
 {
-   EobjListAdd(&EwinListOrder, eo, 0);
+   EobjListAdd(&EobjListOrder, eo, 0);
 }
 
 void
 EobjListOrderDel(EObj * eo)
 {
-   EobjListDel(&EwinListOrder, eo);
+   EobjListDel(&EobjListOrder, eo);
 }
 
 EWin               *const *
 EwinListOrderGet(int *num)
 {
-   return (EWin * const *)EobjListGet(&EwinListOrder, num);
+   return _EwinListGet(&EobjListOrder, num);
 }

-- 


Reply via email to