Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: E.h arrange.c eobj.h ewins.c ewins.h ewmh.c gnome.c stacking.c Log Message: Eliminate old client order list. Shuffle some stuff around. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v retrieving revision 1.476 retrieving revision 1.477 diff -u -3 -r1.476 -r1.477 --- E.h 6 Aug 2005 10:21:53 -0000 1.476 +++ E.h 7 Aug 2005 14:06:48 -0000 1.477 @@ -187,7 +187,6 @@ #define LIST_TYPE_ANY 0 #define LIST_TYPE_CLIENT 1 -#define LIST_TYPE_EWIN 2 #define LIST_TYPE_BORDER 3 #define LIST_TYPE_ICLASS 4 #define LIST_TYPE_ACLASS 5 @@ -1769,25 +1768,6 @@ /* sound.c */ void SoundPlay(const char *name); -/* stacking.c */ -void EobjListStackAdd(EObj * eo, int ontop); -void EobjListFocusAdd(EObj * eo, int ontop); -void EobjListStackDel(EObj * eo); -void EobjListFocusDel(EObj * eo); -int EobjListStackRaise(EObj * eo); -int EobjListFocusRaise(EObj * eo); -int EobjListStackLower(EObj * eo); -int EobjListFocusLower(EObj * eo); -EObj *EobjListStackFind(Window win); -EObj *const *EobjListStackGet(int *num); -EObj *const *EobjListStackGetForDesk(int *num, int desk); -EWin *const *EwinListStackGet(int *num); -EWin *const *EwinListFocusGet(int *num); -EWin *const *EwinListGetForDesk(int *num, int desk); -EWin *EwinListStackGetTop(void); - -#define EwinListGetAll EwinListStackGet - /* startup.c */ void StartupWindowsCreate(void); void StartupWindowsOpen(void); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/arrange.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -3 -r1.78 -r1.79 --- arrange.c 16 Jul 2005 16:57:36 -0000 1.78 +++ arrange.c 7 Aug 2005 14:06:50 -0000 1.79 @@ -576,6 +576,7 @@ void SnapEwin(EWin * ewin, int dx, int dy, int *new_dx, int *new_dy) { + EWin *const *lst1; EWin **lst, **gwins; int gnum, num, i, j, screen_snap_dist, odx, ody; static char last_res = 0; @@ -597,7 +598,13 @@ bottom_bound = top_bound + h; screen_snap_dist = Mode.constrained ? (w + h) : Conf.snap.screen_snap_dist; - lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN); + lst = NULL; + lst1 = EwinListOrderGet(&num); + if (lst1) + { + lst = malloc(num * sizeof(EWin *)); + memcpy(lst, lst1, num * sizeof(EWin *)); + } gwins = ListWinGroupMembersForEwin(ewin, GROUP_ACTION_MOVE, Mode.nogroup || Mode.move.swap, &gnum); if (gwins) =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/eobj.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- eobj.h 16 Jul 2005 16:57:40 -0000 1.1 +++ eobj.h 7 Aug 2005 14:06:51 -0000 1.2 @@ -97,6 +97,7 @@ #define EoLower(eo) EobjLower(EoObj(eo)) #define EoChangeShape(eo) EobjChangeShape(EoObj(eo)) +/* eobj.c */ void EobjInit(EObj * eo, int type, Window win, int x, int y, int w, int h, int su, const char *name); void EobjFini(EObj * eo); @@ -135,4 +136,19 @@ void EobjSlideSizeTo(EObj * eo, int fx, int fy, int tx, int ty, int fw, int fh, int tw, int th, int speed); +/* stacking.c */ +void EobjListStackAdd(EObj * eo, int ontop); +void EobjListStackDel(EObj * eo); +int EobjListStackRaise(EObj * eo); +int EobjListStackLower(EObj * eo); +EObj *EobjListStackFind(Window win); +EObj *const *EobjListStackGet(int *num); +EObj *const *EobjListStackGetForDesk(int *num, int desk); +void EobjListFocusAdd(EObj * eo, int ontop); +void EobjListFocusDel(EObj * eo); +int EobjListFocusRaise(EObj * eo); +int EobjListFocusLower(EObj * eo); +void EobjListOrderAdd(EObj * eo); +void EobjListOrderDel(EObj * eo); + #endif /* _EOBJ_H_ */ =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -3 -r1.90 -r1.91 --- ewins.c 4 Aug 2005 16:01:53 -0000 1.90 +++ ewins.c 7 Aug 2005 14:06:51 -0000 1.91 @@ -124,6 +124,7 @@ EoSetLayer(ewin, 4); EoSetShadow(ewin, 1); EobjListFocusAdd(&ewin->o, 0); + EobjListOrderAdd(&ewin->o); if (use_argb) ewin->win_container = @@ -144,7 +145,6 @@ FocusEwinSetGrabs(ewin); ewin->client.event_mask = EWIN_CLIENT_EVENT_MASK; - AddItem(ewin, "EWIN", win, LIST_TYPE_EWIN); if (EventDebug(EDBUG_TYPE_EWINS)) Eprintf("EwinCreate %#lx frame=%#lx cont=%#lx st=%d\n", @@ -193,7 +193,6 @@ Eprintf("EwinDestroy %#lx st=%d: %s\n", _EwinGetClientXwin(ewin), ewin->state.state, EwinGetName(ewin)); - RemoveItemByPtr(ewin, LIST_TYPE_EWIN); EventCallbackUnregister(EoGetWin(ewin), 0, EwinHandleEventsToplevel, ewin); EventCallbackUnregister(ewin->win_container, 0, EwinHandleEventsContainer, ewin); @@ -217,6 +216,7 @@ Efree(lst); EwinCleanup(ewin); + EobjListOrderDel(&ewin->o); EobjListFocusDel(&ewin->o); EobjFini(&ewin->o); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/ewins.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- ewins.h 4 Aug 2005 16:01:54 -0000 1.4 +++ ewins.h 7 Aug 2005 14:06:51 -0000 1.5 @@ -310,6 +310,15 @@ void EwinOpMoveToDesk(EWin * ewin, int desk); void EwinOpMoveToArea(EWin * ewin, int x, int y); +/* stacking.c */ +EWin *const *EwinListStackGet(int *num); +EWin *const *EwinListFocusGet(int *num); +EWin *const *EwinListGetForDesk(int *num, int desk); +EWin *EwinListStackGetTop(void); +EWin *const *EwinListOrderGet(int *num); + +#define EwinListGetAll EwinListStackGet + /* zoom.c */ EWin *GetZoomEWin(void); void ReZoom(EWin * ewin); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v retrieving revision 1.85 retrieving revision 1.86 diff -u -3 -r1.85 -r1.86 --- ewmh.c 4 Aug 2005 16:01:54 -0000 1.85 +++ ewmh.c 7 Aug 2005 14:06:51 -0000 1.86 @@ -286,15 +286,15 @@ { Ecore_X_Window *wl; int i, num; - EWin **lst; + EWin *const *lst; /* Mapping order */ - lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN); + lst = EwinListOrderGet(&num); if (num > 0) { wl = Emalloc(num * sizeof(Ecore_X_Window)); for (i = 0; i < num; i++) - wl[i] = _EwinGetClientXwin(lst[num - i - 1]); + wl[i] = _EwinGetClientXwin(lst[i]); ecore_x_netwm_client_list_set(VRoot.win, wl, num); Efree(wl); } @@ -302,8 +302,6 @@ { ecore_x_netwm_client_list_set(VRoot.win, NULL, 0); } - if (lst) - Efree(lst); } void =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/gnome.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -3 -r1.53 -r1.54 --- gnome.c 4 Aug 2005 16:01:55 -0000 1.53 +++ gnome.c 7 Aug 2005 14:06:52 -0000 1.54 @@ -652,11 +652,12 @@ static Atom atom_set = 0; unsigned int *wl; int j, i, num; - EWin **lst; + EWin *const *lst; if (!atom_set) atom_set = XInternAtom(disp, XA_WIN_CLIENT_LIST, False); - lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN); + + lst = EwinListOrderGet(&num); wl = NULL; j = 0; if (lst) @@ -671,8 +672,6 @@ ecore_x_window_prop_card32_set(VRoot.win, atom_set, wl, j); if (wl) Efree(wl); - if (lst) - Efree(lst); } static void =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/stacking.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- stacking.c 4 Aug 2005 16:02:02 -0000 1.23 +++ stacking.c 7 Aug 2005 14:06:52 -0000 1.24 @@ -262,10 +262,11 @@ } /* - * The global stacking and focus lists + * The global object/client lists */ EobjList EwinListStack = { "Stack", 0, 0, NULL, 1 }; EobjList EwinListFocus = { "Focus", 0, 0, NULL, 0 }; +EobjList EwinListOrder = { "Order", 0, 0, NULL, 0 }; static EObj *const * EobjListGet(EobjList * ewl, int *num) @@ -293,23 +294,11 @@ } void -EobjListFocusAdd(EObj * eo, int ontop) -{ - EobjListAdd(&EwinListFocus, eo, ontop); -} - -void EobjListStackDel(EObj * eo) { EobjListDel(&EwinListStack, eo); } -void -EobjListFocusDel(EObj * eo) -{ - EobjListDel(&EwinListFocus, eo); -} - int EobjListStackRaise(EObj * eo) { @@ -322,6 +311,18 @@ return EobjListLower(&EwinListStack, eo); } +void +EobjListFocusAdd(EObj * eo, int ontop) +{ + EobjListAdd(&EwinListFocus, eo, ontop); +} + +void +EobjListFocusDel(EObj * eo) +{ + EobjListDel(&EwinListFocus, eo); +} + int EobjListFocusRaise(EObj * eo) { @@ -444,3 +445,21 @@ return NULL; } + +void +EobjListOrderAdd(EObj * eo) +{ + EobjListAdd(&EwinListOrder, eo, 0); +} + +void +EobjListOrderDel(EObj * eo) +{ + EobjListDel(&EwinListOrder, eo); +} + +EWin *const * +EwinListOrderGet(int *num) +{ + return (EWin * const *)EobjListGet(&EwinListOrder, num); +} ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs