Eliminate old client order list. Shuffle some stuff around.
SVN revision: 16058
This commit is contained in:
parent
0167c0810f
commit
03614e3d86
20
src/E.h
20
src/E.h
|
@ -187,7 +187,6 @@ int Esnprintf(va_alist);
|
|||
|
||||
#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 @@ void SnapIpcFunc(const char *params, Client * c);
|
|||
/* 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);
|
||||
|
|
|
@ -576,6 +576,7 @@ ArrangeRects(RectBox * fixed, int fixed_count, RectBox * floating,
|
|||
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 @@ SnapEwin(EWin * ewin, int dx, int dy, int *new_dx, int *new_dy)
|
|||
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)
|
||||
|
|
16
src/eobj.h
16
src/eobj.h
|
@ -97,6 +97,7 @@ struct _eobj
|
|||
#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 EobjsSlideBy(EObj ** peo, int num, int dx, int dy,
|
|||
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_ */
|
||||
|
|
|
@ -124,6 +124,7 @@ EwinCreate(Window win, int type)
|
|||
EoSetLayer(ewin, 4);
|
||||
EoSetShadow(ewin, 1);
|
||||
EobjListFocusAdd(&ewin->o, 0);
|
||||
EobjListOrderAdd(&ewin->o);
|
||||
|
||||
if (use_argb)
|
||||
ewin->win_container =
|
||||
|
@ -144,7 +145,6 @@ EwinCreate(Window win, int type)
|
|||
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 @@ EwinDestroy(EWin * ewin)
|
|||
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 @@ EwinDestroy(EWin * ewin)
|
|||
Efree(lst);
|
||||
|
||||
EwinCleanup(ewin);
|
||||
EobjListOrderDel(&ewin->o);
|
||||
EobjListFocusDel(&ewin->o);
|
||||
EobjFini(&ewin->o);
|
||||
|
||||
|
|
|
@ -310,6 +310,15 @@ void EwinOpSetOpacity(EWin * ewin, int opacity);
|
|||
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);
|
||||
|
|
|
@ -286,15 +286,15 @@ EWMH_SetClientList(void)
|
|||
{
|
||||
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 @@ EWMH_SetClientList(void)
|
|||
{
|
||||
ecore_x_netwm_client_list_set(VRoot.win, NULL, 0);
|
||||
}
|
||||
if (lst)
|
||||
Efree(lst);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -652,11 +652,12 @@ GNOME_SetClientList(void)
|
|||
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 @@ GNOME_SetClientList(void)
|
|||
ecore_x_window_prop_card32_set(VRoot.win, atom_set, wl, j);
|
||||
if (wl)
|
||||
Efree(wl);
|
||||
if (lst)
|
||||
Efree(lst);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -262,10 +262,11 @@ EobjListTypeCount(const EobjList * ewl, int type)
|
|||
}
|
||||
|
||||
/*
|
||||
* 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)
|
||||
|
@ -292,24 +293,12 @@ EobjListStackAdd(EObj * eo, int ontop)
|
|||
EobjListAdd(&EwinListStack, eo, ontop);
|
||||
}
|
||||
|
||||
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 @@ EobjListStackLower(EObj * eo)
|
|||
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 @@ EwinListStackGetTop(void)
|
|||
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue