version 1.142, 2015/08/29 00:39:18 |
version 1.143, 2015/08/29 08:30:54 |
|
|
return (RB_FIND(windows, &windows, &w)); |
return (RB_FIND(windows, &windows, &w)); |
} |
} |
|
|
|
void |
|
window_update_activity(struct window *w) |
|
{ |
|
gettimeofday(&w->activity_time, NULL); |
|
alerts_queue(w, WINDOW_ACTIVITY); |
|
} |
|
|
struct window * |
struct window * |
window_create1(u_int sx, u_int sy) |
window_create1(u_int sx, u_int sy) |
{ |
{ |
|
|
w->sx = sx; |
w->sx = sx; |
w->sy = sy; |
w->sy = sy; |
|
|
if (gettimeofday(&w->activity_time, NULL) != 0) |
|
fatal("gettimeofday failed"); |
|
|
|
options_init(&w->options, &global_w_options); |
options_init(&w->options, &global_w_options); |
|
|
w->references = 0; |
w->references = 0; |
|
|
w->id = next_window_id++; |
w->id = next_window_id++; |
RB_INSERT(windows, &windows, w); |
RB_INSERT(windows, &windows, w); |
|
|
|
window_update_activity(w); |
|
|
return (w); |
return (w); |
} |
} |
|
|
|
|
if (event_initialized(&w->name_event)) |
if (event_initialized(&w->name_event)) |
evtimer_del(&w->name_event); |
evtimer_del(&w->name_event); |
|
|
|
if (event_initialized(&w->alerts_timer)) |
|
evtimer_del(&w->alerts_timer); |
|
|
options_free(&w->options); |
options_free(&w->options); |
|
|
window_destroy_panes(w); |
window_destroy_panes(w); |
|
|
input_parse(wp); |
input_parse(wp); |
|
|
wp->pipe_off = EVBUFFER_LENGTH(evb); |
wp->pipe_off = EVBUFFER_LENGTH(evb); |
|
|
/* |
|
* If we get here, we're not outputting anymore, so set the silence |
|
* flag on the window. |
|
*/ |
|
wp->window->flags |= WINDOW_SILENCE; |
|
if (gettimeofday(&wp->window->silence_timer, NULL) != 0) |
|
fatal("gettimeofday failed"); |
|
return; |
return; |
|
|
start_timer: |
start_timer: |