version 1.44, 2014/05/13 08:08:32 |
version 1.45, 2014/10/22 23:11:41 |
|
|
} |
} |
} |
} |
|
|
|
/* Count number of sessions in session group. */ |
|
u_int |
|
session_group_count(struct session_group *sg) |
|
{ |
|
struct session *s; |
|
u_int n; |
|
|
|
n = 0; |
|
TAILQ_FOREACH(s, &sg->sessions, gentry) |
|
n++; |
|
return (n); |
|
} |
|
|
/* Synchronize a session to its session group. */ |
/* Synchronize a session to its session group. */ |
void |
void |
session_group_synchronize_to(struct session *s) |
session_group_synchronize_to(struct session *s) |
|
|
/* Then free the old winlinks list. */ |
/* Then free the old winlinks list. */ |
while (!RB_EMPTY(&old_windows)) { |
while (!RB_EMPTY(&old_windows)) { |
wl = RB_ROOT(&old_windows); |
wl = RB_ROOT(&old_windows); |
if (winlink_find_by_window_id(&s->windows, wl->window->id) == NULL) |
wl2 = winlink_find_by_window_id(&s->windows, wl->window->id); |
notify_window_unlinked(s, wl->window); |
if (wl2 == NULL) |
|
notify_window_unlinked(s, wl->window); |
winlink_remove(&old_windows, wl); |
winlink_remove(&old_windows, wl); |
} |
} |
} |
} |