diff options
author | nicm <nicm> | 2016-06-16 10:55:47 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-06-16 10:55:47 +0000 |
commit | 325cbe90d925d3deb90559463b6d968c31fa5924 (patch) | |
tree | 579aa5c9a0ddab9362560e5593e4843d5ca3c0a7 /server-fn.c | |
parent | 0c7ddae2abe67762b00fea10723d01251f3c156d (diff) | |
download | rtmux-325cbe90d925d3deb90559463b6d968c31fa5924.tar.gz rtmux-325cbe90d925d3deb90559463b6d968c31fa5924.tar.bz2 rtmux-325cbe90d925d3deb90559463b6d968c31fa5924.zip |
Allow a command to be specified to display-panes, similar to
command-prompt, rather than always just selecting the pane.
Diffstat (limited to 'server-fn.c')
-rw-r--r-- | server-fn.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/server-fn.c b/server-fn.c index 39d31f3c..89398523 100644 --- a/server-fn.c +++ b/server-fn.c @@ -441,21 +441,23 @@ server_set_identify(struct client *c) } void -server_clear_identify(struct client *c) +server_clear_identify(struct client *c, struct window_pane *wp) { - if (c->flags & CLIENT_IDENTIFY) { - c->flags &= ~CLIENT_IDENTIFY; - c->tty.flags &= ~(TTY_FREEZE|TTY_NOCURSOR); - server_redraw_client(c); - } + if (~c->flags & CLIENT_IDENTIFY) + return; + c->flags &= ~CLIENT_IDENTIFY; + + if (c->identify_callback != NULL) + c->identify_callback(c, wp); + + c->tty.flags &= ~(TTY_FREEZE|TTY_NOCURSOR); + server_redraw_client(c); } void server_callback_identify(__unused int fd, __unused short events, void *data) { - struct client *c = data; - - server_clear_identify(c); + server_clear_identify(data, NULL); } /* Set stdin callback. */ |