kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=5a131b00b1d13b75ffa4ca65be0cb0809eb11f28
commit 5a131b00b1d13b75ffa4ca65be0cb0809eb11f28 Author: Kim Woelders <[email protected]> Date: Sun May 3 09:02:06 2020 +0200 groups.c: Eliminate BuildWindowGroup() --- src/groups.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/groups.c b/src/groups.c index d8355e49..58aebc20 100644 --- a/src/groups.c +++ b/src/groups.c @@ -253,18 +253,6 @@ BreakWindowGroup(EWin * ewin, Group * g) } } -static void -BuildWindowGroup(EWin ** ewins, int num, int gid) -{ - int i; - Group *group; - - Mode_groups.current = group = GroupCreate(gid); - - for (i = 0; i < num; i++) - AddEwinToGroup(ewins[i], group); -} - Group ** GroupsGetList(int *pnum) { @@ -373,12 +361,9 @@ GroupsEwinAdd(EWin * ewin, const int *pgid, int ngid) if (!g) { /* This should not happen, but may if group/snap configs are corrupted */ - BuildWindowGroup(&ewin, 1, gid); - } - else - { - _GroupAddEwin(g, ewin); + g = GroupCreate(gid); } + _GroupAddEwin(g, ewin); } SnapshotEwinUpdate(ewin, SNAP_USE_GROUPS); } @@ -1220,7 +1205,9 @@ IPC_GroupOps(const char *params) if (!strcmp(operation, "start")) { - BuildWindowGroup(&ewin, 1, -1); + group = GroupCreate(-1); + Mode_groups.current = group; + AddEwinToGroup(ewin, group); IpcPrintf("start %8x\n", win); } else if (!strcmp(operation, "add")) --
