version 1.162, 2015/10/27 13:23:24 |
version 1.163, 2015/10/27 15:58:42 |
|
|
struct timeval tv; |
struct timeval tv; |
int t; |
int t; |
|
|
if ((t = options_get_number(&s->options, "assume-paste-time")) == 0) |
if ((t = options_get_number(s->options, "assume-paste-time")) == 0) |
return (0); |
return (0); |
|
|
timersub(&s->activity_time, &s->last_activity_time, &tv); |
timersub(&s->activity_time, &s->last_activity_time, &tv); |
|
|
m->valid = 1; |
m->valid = 1; |
m->key = key; |
m->key = key; |
|
|
if (!options_get_number(&s->options, "mouse")) |
if (!options_get_number(s->options, "mouse")) |
goto forward; |
goto forward; |
} else |
} else |
m->valid = 0; |
m->valid = 0; |
|
|
* If this is a repeating key, start the timer. Otherwise reset |
* If this is a repeating key, start the timer. Otherwise reset |
* the client back to the root table. |
* the client back to the root table. |
*/ |
*/ |
xtimeout = options_get_number(&s->options, "repeat-time"); |
xtimeout = options_get_number(s->options, "repeat-time"); |
if (xtimeout != 0 && bd->can_repeat) { |
if (xtimeout != 0 && bd->can_repeat) { |
c->flags |= CLIENT_REPEAT; |
c->flags |= CLIENT_REPEAT; |
|
|
|
|
* No match, but in the root table. Prefix switches to the prefix table |
* No match, but in the root table. Prefix switches to the prefix table |
* and everything else is passed through. |
* and everything else is passed through. |
*/ |
*/ |
if (key == options_get_number(&s->options, "prefix") || |
if (key == options_get_number(s->options, "prefix") || |
key == options_get_number(&s->options, "prefix2")) { |
key == options_get_number(s->options, "prefix2")) { |
server_client_key_table(c, "prefix"); |
server_client_key_table(c, "prefix"); |
server_status_client(c); |
server_status_client(c); |
return; |
return; |
|
|
int push; |
int push; |
|
|
/* Are focus events off? */ |
/* Are focus events off? */ |
if (!options_get_number(&global_options, "focus-events")) |
if (!options_get_number(global_options, "focus-events")) |
return; |
return; |
|
|
/* Do we need to push the focus state? */ |
/* Do we need to push the focus state? */ |
|
|
struct window *w = c->session->curw->window; |
struct window *w = c->session->curw->window; |
struct window_pane *wp = w->active; |
struct window_pane *wp = w->active; |
struct screen *s = wp->screen; |
struct screen *s = wp->screen; |
struct options *oo = &c->session->options; |
struct options *oo = c->session->options; |
int status, mode, o; |
int status, mode, o; |
|
|
if (c->flags & CLIENT_SUSPENDED) |
if (c->flags & CLIENT_SUSPENDED) |
|
|
return; |
return; |
|
|
if (c->flags & (CLIENT_REDRAW|CLIENT_STATUS)) { |
if (c->flags & (CLIENT_REDRAW|CLIENT_STATUS)) { |
if (options_get_number(&s->options, "set-titles")) |
if (options_get_number(s->options, "set-titles")) |
server_client_set_title(c); |
server_client_set_title(c); |
|
|
if (c->message_string != NULL) |
if (c->message_string != NULL) |
|
|
char *title; |
char *title; |
struct format_tree *ft; |
struct format_tree *ft; |
|
|
template = options_get_string(&s->options, "set-titles-string"); |
template = options_get_string(s->options, "set-titles-string"); |
|
|
ft = format_create(); |
ft = format_create(); |
format_defaults(ft, c, NULL, NULL, NULL); |
format_defaults(ft, c, NULL, NULL, NULL); |
|
|
{ |
{ |
const char *shell; |
const char *shell; |
|
|
shell = options_get_string(&global_s_options, "default-shell"); |
shell = options_get_string(global_s_options, "default-shell"); |
if (*shell == '\0' || areshell(shell)) |
if (*shell == '\0' || areshell(shell)) |
shell = _PATH_BSHELL; |
shell = _PATH_BSHELL; |
proc_send_s(c->peer, MSG_SHELL, shell); |
proc_send_s(c->peer, MSG_SHELL, shell); |