version 1.67, 2016/10/15 09:27:52 |
version 1.68, 2016/10/16 22:06:40 |
|
|
} |
} |
|
|
log_debug("session %s created", s->name); |
log_debug("session %s created", s->name); |
notify_session_created(s); |
notify_session("session-created", s); |
|
|
return (s); |
return (s); |
} |
} |
|
|
s->curw = NULL; |
s->curw = NULL; |
|
|
RB_REMOVE(sessions, &sessions, s); |
RB_REMOVE(sessions, &sessions, s); |
notify_session_closed(s); |
notify_session("session-closed", s); |
|
|
free(s->tio); |
free(s->tio); |
|
|
|
|
winlink_stack_remove(&s->lastw, TAILQ_FIRST(&s->lastw)); |
winlink_stack_remove(&s->lastw, TAILQ_FIRST(&s->lastw)); |
while (!RB_EMPTY(&s->windows)) { |
while (!RB_EMPTY(&s->windows)) { |
wl = RB_ROOT(&s->windows); |
wl = RB_ROOT(&s->windows); |
notify_window_unlinked(s, wl->window); |
notify_session_window("window-unlinked", s, wl->window); |
winlink_remove(&s->windows, wl); |
winlink_remove(&s->windows, wl); |
} |
} |
|
|
|
|
return (NULL); |
return (NULL); |
} |
} |
winlink_set_window(wl, w); |
winlink_set_window(wl, w); |
notify_window_linked(s, w); |
notify_session_window("window-linked", s, w); |
environ_free(env); |
environ_free(env); |
|
|
session_group_synchronize_from(s); |
session_group_synchronize_from(s); |
|
|
return (NULL); |
return (NULL); |
} |
} |
winlink_set_window(wl, w); |
winlink_set_window(wl, w); |
notify_window_linked(s, w); |
notify_session_window("window-linked", s, w); |
|
|
session_group_synchronize_from(s); |
session_group_synchronize_from(s); |
return (wl); |
return (wl); |
|
|
session_next(s, 0); |
session_next(s, 0); |
|
|
wl->flags &= ~WINLINK_ALERTFLAGS; |
wl->flags &= ~WINLINK_ALERTFLAGS; |
notify_window_unlinked(s, wl->window); |
notify_session_window("window-unlinked", s, wl->window); |
winlink_stack_remove(&s->lastw, wl); |
winlink_stack_remove(&s->lastw, wl); |
winlink_remove(&s->windows, wl); |
winlink_remove(&s->windows, wl); |
|
|
|
|
RB_FOREACH(wl, winlinks, ww) { |
RB_FOREACH(wl, winlinks, ww) { |
wl2 = winlink_add(&s->windows, wl->idx); |
wl2 = winlink_add(&s->windows, wl->idx); |
winlink_set_window(wl2, wl->window); |
winlink_set_window(wl2, wl->window); |
notify_window_linked(s, wl2->window); |
notify_session_window("window-linked", s, wl2->window); |
wl2->flags |= wl->flags & WINLINK_ALERTFLAGS; |
wl2->flags |= wl->flags & WINLINK_ALERTFLAGS; |
} |
} |
|
|
|
|
wl = RB_ROOT(&old_windows); |
wl = RB_ROOT(&old_windows); |
wl2 = winlink_find_by_window_id(&s->windows, wl->window->id); |
wl2 = winlink_find_by_window_id(&s->windows, wl->window->id); |
if (wl2 == NULL) |
if (wl2 == NULL) |
notify_window_unlinked(s, wl->window); |
notify_session_window("window-unlinked", s, wl->window); |
winlink_remove(&old_windows, wl); |
winlink_remove(&old_windows, wl); |
} |
} |
} |
} |