mirror of
https://github.com/tmux/tmux.git
synced 2026-06-22 11:16:57 +00:00
Merge branch 'master' into floating_panes
This commit is contained in:
@@ -30,6 +30,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static enum cmd_retval cmd_join_pane_exec(struct cmd *, struct cmdq_item *);
|
static enum cmd_retval cmd_join_pane_exec(struct cmd *, struct cmdq_item *);
|
||||||
|
static enum cmd_retval cmd_join_pane_mouse_update(struct cmdq_item *);
|
||||||
|
static void cmd_join_pane_mouse_move(struct client *,
|
||||||
|
struct mouse_event *);
|
||||||
|
|
||||||
const struct cmd_entry cmd_join_pane_entry = {
|
const struct cmd_entry cmd_join_pane_entry = {
|
||||||
.name = "join-pane",
|
.name = "join-pane",
|
||||||
@@ -49,8 +52,8 @@ const struct cmd_entry cmd_move_pane_entry = {
|
|||||||
.name = "move-pane",
|
.name = "move-pane",
|
||||||
.alias = "movep",
|
.alias = "movep",
|
||||||
|
|
||||||
.args = { "bdfhvl:L::P:R::s:t:U::X:Y:z:", 0, 0, NULL },
|
.args = { "bdfhMvl:L::P:R::s:t:U::X:Y:z:", 0, 0, NULL },
|
||||||
.usage = "[-bdfhv] [-D lines] [-l size] [-L columns] [-P position] "
|
.usage = "[-bdfhMv] [-D lines] [-l size] [-L columns] [-P position] "
|
||||||
"[-R columns] " CMD_SRCDST_PANE_USAGE " [-U lines] "
|
"[-R columns] " CMD_SRCDST_PANE_USAGE " [-U lines] "
|
||||||
"[-X x-position] [-Y y-position] [-z z-index]",
|
"[-X x-position] [-Y y-position] [-z z-index]",
|
||||||
|
|
||||||
@@ -254,6 +257,71 @@ cmd_join_pane_move(struct cmdq_item *item, struct args *args,
|
|||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static enum cmd_retval
|
||||||
|
cmd_join_pane_mouse_update(struct cmdq_item *item)
|
||||||
|
{
|
||||||
|
struct cmd_find_state *target = cmdq_get_target(item);
|
||||||
|
struct key_event *event = cmdq_get_event(item);
|
||||||
|
struct client *c = cmdq_get_client(item);
|
||||||
|
struct session *s = target->s;
|
||||||
|
struct winlink *wl;
|
||||||
|
struct window *w;
|
||||||
|
struct window_pane *wp;
|
||||||
|
|
||||||
|
if (!event->m.valid)
|
||||||
|
return (CMD_RETURN_NORMAL);
|
||||||
|
wp = cmd_mouse_pane(&event->m, &s, &wl);
|
||||||
|
if (wp == NULL || c == NULL || c->session != s)
|
||||||
|
return (CMD_RETURN_NORMAL);
|
||||||
|
if (!window_pane_is_floating(wp))
|
||||||
|
return (CMD_RETURN_NORMAL);
|
||||||
|
|
||||||
|
w = wl->window;
|
||||||
|
window_redraw_active_switch(w, wp);
|
||||||
|
window_set_active_pane(w, wp, 1);
|
||||||
|
|
||||||
|
c->tty.mouse_drag_update = cmd_join_pane_mouse_move;
|
||||||
|
cmd_join_pane_mouse_move(c, &event->m);
|
||||||
|
return (CMD_RETURN_NORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
cmd_join_pane_mouse_move(struct client *c, struct mouse_event *m)
|
||||||
|
{
|
||||||
|
struct winlink *wl;
|
||||||
|
struct window *w;
|
||||||
|
struct window_pane *wp;
|
||||||
|
struct layout_cell *lc;
|
||||||
|
int y, ly, x, lx;
|
||||||
|
|
||||||
|
wp = cmd_mouse_pane(m, NULL, &wl);
|
||||||
|
if (wp == NULL) {
|
||||||
|
c->tty.mouse_drag_update = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
w = wl->window;
|
||||||
|
lc = wp->layout_cell;
|
||||||
|
|
||||||
|
y = m->y + m->oy; x = m->x + m->ox;
|
||||||
|
if (m->statusat == 0 && y >= (int)m->statuslines)
|
||||||
|
y -= m->statuslines;
|
||||||
|
else if (m->statusat > 0 && y >= m->statusat)
|
||||||
|
y = m->statusat - 1;
|
||||||
|
ly = m->ly + m->oy; lx = m->lx + m->ox;
|
||||||
|
if (m->statusat == 0 && ly >= (int)m->statuslines)
|
||||||
|
ly -= m->statuslines;
|
||||||
|
else if (m->statusat > 0 && ly >= m->statusat)
|
||||||
|
ly = m->statusat - 1;
|
||||||
|
|
||||||
|
if (x != lx || y != ly) {
|
||||||
|
lc->xoff += x - lx;
|
||||||
|
lc->yoff += y - ly;
|
||||||
|
layout_fix_panes(w, NULL);
|
||||||
|
server_redraw_window(w);
|
||||||
|
server_redraw_window_borders(w);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static enum cmd_retval
|
static enum cmd_retval
|
||||||
cmd_join_pane_zindex(struct cmdq_item *item, struct winlink *wl,
|
cmd_join_pane_zindex(struct cmdq_item *item, struct winlink *wl,
|
||||||
struct window_pane *wp, const char *s)
|
struct window_pane *wp, const char *s)
|
||||||
@@ -314,6 +382,8 @@ cmd_join_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
server_unzoom_window(dst_w);
|
server_unzoom_window(dst_w);
|
||||||
|
|
||||||
if (cmd_get_entry(self) == &cmd_move_pane_entry) {
|
if (cmd_get_entry(self) == &cmd_move_pane_entry) {
|
||||||
|
if (args_has(args, 'M'))
|
||||||
|
return (cmd_join_pane_mouse_update(item));
|
||||||
if (!window_pane_is_floating(dst_wp)) {
|
if (!window_pane_is_floating(dst_wp)) {
|
||||||
cmdq_error(item, "pane is not floating");
|
cmdq_error(item, "pane is not floating");
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ static enum cmd_retval cmd_resize_pane_exec(struct cmd *, struct cmdq_item *);
|
|||||||
|
|
||||||
static enum cmd_retval cmd_resize_pane_mouse_update(struct cmd *,
|
static enum cmd_retval cmd_resize_pane_mouse_update(struct cmd *,
|
||||||
struct cmdq_item *);
|
struct cmdq_item *);
|
||||||
static void cmd_resize_pane_mouse_update_floating(struct client *,
|
static void cmd_resize_pane_mouse_resize_move_floating(
|
||||||
struct mouse_event *);
|
struct client *, struct mouse_event *);
|
||||||
static void cmd_resize_pane_mouse_update_tiled(struct client *,
|
static void cmd_resize_pane_mouse_resize_tiled(struct client *,
|
||||||
struct mouse_event *);
|
struct mouse_event *);
|
||||||
|
|
||||||
const struct cmd_entry cmd_resize_pane_entry = {
|
const struct cmd_entry cmd_resize_pane_entry = {
|
||||||
@@ -205,21 +205,29 @@ cmd_resize_pane_mouse_update(__unused struct cmd *self, struct cmdq_item *item)
|
|||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
|
|
||||||
if (!window_pane_is_floating(wp)) {
|
if (!window_pane_is_floating(wp)) {
|
||||||
c->tty.mouse_drag_update = cmd_resize_pane_mouse_update_tiled;
|
c->tty.mouse_drag_update = cmd_resize_pane_mouse_resize_tiled;
|
||||||
cmd_resize_pane_mouse_update_tiled(c, &event->m);
|
cmd_resize_pane_mouse_resize_tiled(c, &event->m);
|
||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
window_redraw_active_switch(w, wp);
|
window_redraw_active_switch(w, wp);
|
||||||
window_set_active_pane(w, wp, 1);
|
window_set_active_pane(w, wp, 1);
|
||||||
|
|
||||||
c->tty.mouse_drag_update = cmd_resize_pane_mouse_update_floating;
|
c->tty.mouse_drag_update = cmd_resize_pane_mouse_resize_move_floating;
|
||||||
cmd_resize_pane_mouse_update_floating(c, &event->m);
|
cmd_resize_pane_mouse_resize_move_floating(c, &event->m);
|
||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Resizes or moves the pane by dragging. Resize a floating pane by dragging
|
||||||
|
* the borders or corners. Grabbing an edge only resizes that axis (special
|
||||||
|
* case). Moves the pane if dragging the top border. Since characters are
|
||||||
|
* generally rectangular, to make it easier to grab the corner, the character
|
||||||
|
* next to the corner is also considered the corner.
|
||||||
|
*/
|
||||||
static void
|
static void
|
||||||
cmd_resize_pane_mouse_update_floating(struct client *c, struct mouse_event *m)
|
cmd_resize_pane_mouse_resize_move_floating(struct client *c,
|
||||||
|
struct mouse_event *m)
|
||||||
{
|
{
|
||||||
struct winlink *wl;
|
struct winlink *wl;
|
||||||
struct window *w;
|
struct window *w;
|
||||||
@@ -345,7 +353,7 @@ cmd_resize_pane_mouse_update_floating(struct client *c, struct mouse_event *m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cmd_resize_pane_mouse_update_tiled(struct client *c, struct mouse_event *m)
|
cmd_resize_pane_mouse_resize_tiled(struct client *c, struct mouse_event *m)
|
||||||
{
|
{
|
||||||
struct winlink *wl;
|
struct winlink *wl;
|
||||||
struct window *w;
|
struct window *w;
|
||||||
|
|||||||
@@ -453,6 +453,7 @@ key_bindings_init(void)
|
|||||||
|
|
||||||
/* Mouse button 1 drag on pane. */
|
/* Mouse button 1 drag on pane. */
|
||||||
"bind -n MouseDrag1Pane { if -F '#{||:#{pane_in_mode},#{mouse_any_flag}}' { send -M } { copy-mode -M } }",
|
"bind -n MouseDrag1Pane { if -F '#{||:#{pane_in_mode},#{mouse_any_flag}}' { send -M } { copy-mode -M } }",
|
||||||
|
"bind -n M-MouseDrag1Pane { move-pane -M }",
|
||||||
|
|
||||||
/* Mouse wheel up on pane. */
|
/* Mouse wheel up on pane. */
|
||||||
"bind -n WheelUpPane { if -F '#{||:#{alternate_on},#{pane_in_mode},#{mouse_any_flag}}' { send -M } { copy-mode -e } }",
|
"bind -n WheelUpPane { if -F '#{||:#{alternate_on},#{pane_in_mode},#{mouse_any_flag}}' { send -M } { copy-mode -e } }",
|
||||||
@@ -471,6 +472,7 @@ key_bindings_init(void)
|
|||||||
|
|
||||||
/* Mouse button 1 drag on border. */
|
/* Mouse button 1 drag on border. */
|
||||||
"bind -n MouseDrag1Border { resize-pane -M }",
|
"bind -n MouseDrag1Border { resize-pane -M }",
|
||||||
|
"bind -n M-MouseDrag1Border { move-pane -M }",
|
||||||
|
|
||||||
/* Mouse button 1 down on status line. */
|
/* Mouse button 1 down on status line. */
|
||||||
"bind -n MouseDown1Status { if -F '#{&&:#{pane_active},#{!#{pane_hidden_flag}}}' { hide-pane -t= } { switch-client -t= } }",
|
"bind -n MouseDown1Status { if -F '#{&&:#{pane_active},#{!#{pane_hidden_flag}}}' { hide-pane -t= } { switch-client -t= } }",
|
||||||
|
|||||||
@@ -151,10 +151,10 @@ screen_write_set_client_cb(struct tty_ctx *ttyctx, struct client *c)
|
|||||||
|
|
||||||
if (wp->flags & (PANE_REDRAW|PANE_DROP))
|
if (wp->flags & (PANE_REDRAW|PANE_DROP))
|
||||||
return (-1);
|
return (-1);
|
||||||
if (c->flags & CLIENT_REDRAWPANES) {
|
if (c->flags & CLIENT_REDRAWWINDOW) {
|
||||||
/*
|
/*
|
||||||
* Redraw is already deferred to redraw another pane - redraw
|
* Redraw is already deferred to redraw the window - redraw this
|
||||||
* this one also when that happens.
|
* one also when that happens.
|
||||||
*/
|
*/
|
||||||
log_debug("%s: adding %%%u to deferred redraw", __func__,
|
log_debug("%s: adding %%%u to deferred redraw", __func__,
|
||||||
wp->id);
|
wp->id);
|
||||||
|
|||||||
134
server-client.c
134
server-client.c
@@ -2022,31 +2022,23 @@ server_client_check_redraw(struct client *c)
|
|||||||
struct tty *tty = &c->tty;
|
struct tty *tty = &c->tty;
|
||||||
struct window *w = c->session->curw->window;
|
struct window *w = c->session->curw->window;
|
||||||
struct window_pane *wp;
|
struct window_pane *wp;
|
||||||
int needed, tty_flags, mode = tty->mode;
|
int needed, tflags, mode = tty->mode;
|
||||||
uint64_t client_flags = 0;
|
uint64_t client_flags = 0;
|
||||||
int redraw_pane, redraw_scrollbar_only;
|
|
||||||
u_int bit = 0;
|
|
||||||
struct timeval tv = { .tv_usec = 1000 };
|
struct timeval tv = { .tv_usec = 1000 };
|
||||||
static struct event ev;
|
static struct event ev;
|
||||||
size_t left;
|
size_t n;
|
||||||
|
|
||||||
if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
|
if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
|
||||||
return;
|
return;
|
||||||
if (c->flags & CLIENT_ALLREDRAWFLAGS) {
|
if (c->flags & CLIENT_ALLREDRAWFLAGS) {
|
||||||
log_debug("%s: redraw%s%s%s%s%s%s", c->name,
|
log_debug("%s: redraw%s%s%s%s", c->name,
|
||||||
(c->flags & CLIENT_REDRAWWINDOW) ? " window" : "",
|
(c->flags & CLIENT_REDRAWWINDOW) ? " window" : "",
|
||||||
(c->flags & CLIENT_REDRAWSTATUS) ? " status" : "",
|
(c->flags & CLIENT_REDRAWSTATUS) ? " status" : "",
|
||||||
(c->flags & CLIENT_REDRAWBORDERS) ? " borders" : "",
|
(c->flags & CLIENT_REDRAWBORDERS) ? " borders" : "",
|
||||||
(c->flags & CLIENT_REDRAWOVERLAY) ? " overlay" : "",
|
(c->flags & CLIENT_REDRAWOVERLAY) ? " overlay" : "");
|
||||||
(c->flags & CLIENT_REDRAWPANES) ? " panes" : "",
|
|
||||||
(c->flags & CLIENT_REDRAWSCROLLBARS) ? " scrollbars" : "");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Work out if a redraw is actually needed. */
|
||||||
* If there is outstanding data, defer the redraw until it has been
|
|
||||||
* consumed. We can just add a timer to get out of the event loop and
|
|
||||||
* end up back here.
|
|
||||||
*/
|
|
||||||
needed = 0;
|
needed = 0;
|
||||||
if (c->flags & CLIENT_ALLREDRAWFLAGS)
|
if (c->flags & CLIENT_ALLREDRAWFLAGS)
|
||||||
needed = 1;
|
needed = 1;
|
||||||
@@ -2054,22 +2046,31 @@ server_client_check_redraw(struct client *c)
|
|||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
if (wp->flags & PANE_REDRAW) {
|
if (wp->flags & PANE_REDRAW) {
|
||||||
needed = 1;
|
needed = 1;
|
||||||
client_flags |= CLIENT_REDRAWPANES;
|
client_flags |= CLIENT_REDRAWWINDOW;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (wp->flags & PANE_REDRAWSCROLLBAR) {
|
if (wp->flags & PANE_REDRAWSCROLLBAR) {
|
||||||
needed = 1;
|
needed = 1;
|
||||||
client_flags |= CLIENT_REDRAWSCROLLBARS;
|
client_flags |= CLIENT_REDRAWWINDOW;
|
||||||
/* no break - later panes may need redraw */
|
/* no break - later panes may need redraw */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
left = EVBUFFER_LENGTH(tty->out);
|
if (!needed) {
|
||||||
if (needed && (left != 0 || (tty->flags & TTY_BLOCK))) {
|
c->flags &= ~CLIENT_STATUSFORCE;
|
||||||
if (left != 0) {
|
return;
|
||||||
log_debug("%s: redraw deferred (%zu left)", c->name,
|
}
|
||||||
left);
|
|
||||||
} else
|
/*
|
||||||
|
* If there is outstanding data, defer the redraw until it has been
|
||||||
|
* consumed. We can just add a timer to get out of the event loop and
|
||||||
|
* end up back here.
|
||||||
|
*/
|
||||||
|
n = EVBUFFER_LENGTH(tty->out);
|
||||||
|
if (n != 0 || (tty->flags & TTY_BLOCK)) {
|
||||||
|
if (n != 0)
|
||||||
|
log_debug("%s: redraw deferred (%zu left)", c->name, n);
|
||||||
|
else
|
||||||
log_debug("%s: redraw deferred (blocked)", c->name);
|
log_debug("%s: redraw deferred (blocked)", c->name);
|
||||||
if (!evtimer_initialized(&ev))
|
if (!evtimer_initialized(&ev))
|
||||||
evtimer_set(&ev, server_client_redraw_timer, NULL);
|
evtimer_set(&ev, server_client_redraw_timer, NULL);
|
||||||
@@ -2077,76 +2078,37 @@ server_client_check_redraw(struct client *c)
|
|||||||
log_debug("redraw timer started");
|
log_debug("redraw timer started");
|
||||||
evtimer_add(&ev, &tv);
|
evtimer_add(&ev, &tv);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (~c->flags & CLIENT_REDRAWWINDOW) {
|
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
|
||||||
if (wp->flags & (PANE_REDRAW)) {
|
|
||||||
log_debug("%s: pane %%%u needs redraw",
|
|
||||||
c->name, wp->id);
|
|
||||||
c->redraw_panes |= (1 << bit);
|
|
||||||
} else if (wp->flags & PANE_REDRAWSCROLLBAR) {
|
|
||||||
log_debug("%s: pane %%%u scrollbar "
|
|
||||||
"needs redraw", c->name, wp->id);
|
|
||||||
c->redraw_scrollbars |= (1 << bit);
|
|
||||||
}
|
|
||||||
if (++bit == 64) {
|
|
||||||
/*
|
|
||||||
* If more that 64 panes, give up and
|
|
||||||
* just redraw the window.
|
|
||||||
*/
|
|
||||||
client_flags &= ~(CLIENT_REDRAWPANES|
|
|
||||||
CLIENT_REDRAWSCROLLBARS);
|
|
||||||
client_flags |= CLIENT_REDRAWWINDOW;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (c->redraw_panes != 0)
|
|
||||||
c->flags |= CLIENT_REDRAWPANES;
|
|
||||||
if (c->redraw_scrollbars != 0)
|
|
||||||
c->flags |= CLIENT_REDRAWSCROLLBARS;
|
|
||||||
}
|
|
||||||
c->flags |= client_flags;
|
c->flags |= client_flags;
|
||||||
return;
|
return;
|
||||||
} else if (needed)
|
}
|
||||||
log_debug("%s: redraw needed", c->name);
|
|
||||||
|
|
||||||
tty_flags = tty->flags & (TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR);
|
/* Unfreeze the tty and turn off the cursor. */
|
||||||
|
log_debug("%s: redraw needed", c->name);
|
||||||
|
tflags = tty->flags & (TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR);
|
||||||
tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE))|TTY_NOCURSOR;
|
tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE))|TTY_NOCURSOR;
|
||||||
|
|
||||||
if (~c->flags & CLIENT_REDRAWWINDOW) {
|
|
||||||
/*
|
/*
|
||||||
* If not redrawing the entire window, check whether each pane
|
* If not redrawing the entire window, check whether each pane needs to
|
||||||
* needs to be redrawn.
|
* be redrawn.
|
||||||
*/
|
*/
|
||||||
|
if (~c->flags & CLIENT_REDRAWWINDOW) {
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
redraw_pane = 0;
|
if (wp->flags & PANE_REDRAW) {
|
||||||
redraw_scrollbar_only = 0;
|
log_debug("%s: redraw pane %%%u", __func__,
|
||||||
if (wp->flags & PANE_REDRAW)
|
|
||||||
redraw_pane = 1;
|
|
||||||
else if (c->flags & CLIENT_REDRAWPANES) {
|
|
||||||
if (c->redraw_panes & (1 << bit))
|
|
||||||
redraw_pane = 1;
|
|
||||||
} else if (c->flags & CLIENT_REDRAWSCROLLBARS) {
|
|
||||||
if (c->redraw_scrollbars & (1 << bit))
|
|
||||||
redraw_scrollbar_only = 1;
|
|
||||||
}
|
|
||||||
bit++;
|
|
||||||
if (!redraw_pane && !redraw_scrollbar_only)
|
|
||||||
continue;
|
|
||||||
if (redraw_scrollbar_only) {
|
|
||||||
log_debug("%s: redrawing (scrollbar only) pane "
|
|
||||||
"%%%u", __func__, wp->id);
|
|
||||||
} else {
|
|
||||||
log_debug("%s: redrawing pane %%%u", __func__,
|
|
||||||
wp->id);
|
wp->id);
|
||||||
|
screen_redraw_pane(c, wp, 0);
|
||||||
|
} else if (wp->flags & PANE_REDRAWSCROLLBAR) {
|
||||||
|
log_debug("%s: redraw scrollbar %%%u", __func__,
|
||||||
|
wp->id);
|
||||||
|
screen_redraw_pane(c, wp, 1);
|
||||||
}
|
}
|
||||||
screen_redraw_pane(c, wp, redraw_scrollbar_only);
|
|
||||||
}
|
}
|
||||||
c->redraw_panes = 0;
|
|
||||||
c->redraw_scrollbars = 0;
|
|
||||||
c->flags &= ~(CLIENT_REDRAWPANES|CLIENT_REDRAWSCROLLBARS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set titles etc and do the redraw if there are redraw flags (and we
|
||||||
|
* aren't here just to redraw panes).
|
||||||
|
*/
|
||||||
if (c->flags & CLIENT_ALLREDRAWFLAGS) {
|
if (c->flags & CLIENT_ALLREDRAWFLAGS) {
|
||||||
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);
|
||||||
@@ -2156,23 +2118,19 @@ server_client_check_redraw(struct client *c)
|
|||||||
screen_redraw_screen(c);
|
screen_redraw_screen(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
tty->flags = (tty->flags & ~TTY_NOCURSOR)|(tty_flags & TTY_NOCURSOR);
|
/* Put the tty back how it was. */
|
||||||
|
tty->flags = (tty->flags & ~TTY_NOCURSOR)|(tflags & TTY_NOCURSOR);
|
||||||
tty_update_mode(tty, mode, NULL);
|
tty_update_mode(tty, mode, NULL);
|
||||||
tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR))|
|
tty->flags = (tty->flags & ~(TTY_BLOCK|TTY_FREEZE|TTY_NOCURSOR))|tflags;
|
||||||
tty_flags;
|
|
||||||
|
|
||||||
c->flags &= ~(CLIENT_ALLREDRAWFLAGS|CLIENT_STATUSFORCE);
|
|
||||||
|
|
||||||
if (needed) {
|
|
||||||
/*
|
/*
|
||||||
* We would have deferred the redraw unless the output buffer
|
* All the redraw flags can now be cleared. Also record how many bytes
|
||||||
* was empty, so we can record how many bytes the redraw
|
* were written.
|
||||||
* generated.
|
|
||||||
*/
|
*/
|
||||||
|
c->flags &= ~(CLIENT_ALLREDRAWFLAGS|CLIENT_STATUSFORCE);
|
||||||
c->redraw = EVBUFFER_LENGTH(tty->out);
|
c->redraw = EVBUFFER_LENGTH(tty->out);
|
||||||
log_debug("%s: redraw added %zu bytes", c->name, c->redraw);
|
log_debug("%s: redraw added %zu bytes", c->name, c->redraw);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Set client title. */
|
/* Set client title. */
|
||||||
static void
|
static void
|
||||||
|
|||||||
6
tmux.1
6
tmux.1
@@ -3375,7 +3375,7 @@ all visible panes in the window are hidden.
|
|||||||
The pane must not already be hidden.
|
The pane must not already be hidden.
|
||||||
.Tg movep
|
.Tg movep
|
||||||
.It Xo Ic move\-pane
|
.It Xo Ic move\-pane
|
||||||
.Op Fl bdfhv
|
.Op Fl bdfhMv
|
||||||
.Op Fl D Op Ar lines
|
.Op Fl D Op Ar lines
|
||||||
.Op Fl l Ar size
|
.Op Fl l Ar size
|
||||||
.Op Fl L Op Ar columns
|
.Op Fl L Op Ar columns
|
||||||
@@ -3447,6 +3447,10 @@ move it to an absolute position.
|
|||||||
moves the pane to the given
|
moves the pane to the given
|
||||||
.Ar z-index ,
|
.Ar z-index ,
|
||||||
where zero is the front.
|
where zero is the front.
|
||||||
|
.Pp
|
||||||
|
.Fl M
|
||||||
|
begins a mouse drag (only valid if bound to a mouse key binding, see
|
||||||
|
.Sx MOUSE SUPPORT ) .
|
||||||
.Tg movew
|
.Tg movew
|
||||||
.It Xo Ic move\-window
|
.It Xo Ic move\-window
|
||||||
.Op Fl abrdk
|
.Op Fl abrdk
|
||||||
|
|||||||
11
tmux.h
11
tmux.h
@@ -2145,7 +2145,7 @@ struct client {
|
|||||||
#define CLIENT_CONTROL_NOOUTPUT 0x4000000
|
#define CLIENT_CONTROL_NOOUTPUT 0x4000000
|
||||||
#define CLIENT_DEFAULTSOCKET 0x8000000
|
#define CLIENT_DEFAULTSOCKET 0x8000000
|
||||||
#define CLIENT_STARTSERVER 0x10000000
|
#define CLIENT_STARTSERVER 0x10000000
|
||||||
#define CLIENT_REDRAWPANES 0x20000000
|
/* 0x20000000 unused */
|
||||||
#define CLIENT_NOFORK 0x40000000
|
#define CLIENT_NOFORK 0x40000000
|
||||||
#define CLIENT_ACTIVEPANE 0x80000000ULL
|
#define CLIENT_ACTIVEPANE 0x80000000ULL
|
||||||
#define CLIENT_CONTROL_PAUSEAFTER 0x100000000ULL
|
#define CLIENT_CONTROL_PAUSEAFTER 0x100000000ULL
|
||||||
@@ -2154,16 +2154,14 @@ struct client {
|
|||||||
/* 0x800000000ULL unused */
|
/* 0x800000000ULL unused */
|
||||||
#define CLIENT_BRACKETPASTING 0x1000000000ULL
|
#define CLIENT_BRACKETPASTING 0x1000000000ULL
|
||||||
#define CLIENT_ASSUMEPASTING 0x2000000000ULL
|
#define CLIENT_ASSUMEPASTING 0x2000000000ULL
|
||||||
#define CLIENT_REDRAWSCROLLBARS 0x4000000000ULL
|
/* 0x4000000000ULL unused */
|
||||||
#define CLIENT_NO_DETACH_ON_DESTROY 0x8000000000ULL
|
#define CLIENT_NO_DETACH_ON_DESTROY 0x8000000000ULL
|
||||||
#define CLIENT_ALLREDRAWFLAGS \
|
#define CLIENT_ALLREDRAWFLAGS \
|
||||||
(CLIENT_REDRAWWINDOW| \
|
(CLIENT_REDRAWWINDOW| \
|
||||||
CLIENT_REDRAWSTATUS| \
|
CLIENT_REDRAWSTATUS| \
|
||||||
CLIENT_REDRAWSTATUSALWAYS| \
|
CLIENT_REDRAWSTATUSALWAYS| \
|
||||||
CLIENT_REDRAWBORDERS| \
|
CLIENT_REDRAWBORDERS| \
|
||||||
CLIENT_REDRAWOVERLAY| \
|
CLIENT_REDRAWOVERLAY)
|
||||||
CLIENT_REDRAWPANES| \
|
|
||||||
CLIENT_REDRAWSCROLLBARS)
|
|
||||||
#define CLIENT_UNATTACHEDFLAGS \
|
#define CLIENT_UNATTACHEDFLAGS \
|
||||||
(CLIENT_DEAD| \
|
(CLIENT_DEAD| \
|
||||||
CLIENT_SUSPENDED| \
|
CLIENT_SUSPENDED| \
|
||||||
@@ -2190,9 +2188,6 @@ struct client {
|
|||||||
key_code last_key;
|
key_code last_key;
|
||||||
time_t paste_time;
|
time_t paste_time;
|
||||||
|
|
||||||
uint64_t redraw_panes;
|
|
||||||
uint64_t redraw_scrollbars;
|
|
||||||
|
|
||||||
int message_ignore_keys;
|
int message_ignore_keys;
|
||||||
int message_ignore_styles;
|
int message_ignore_styles;
|
||||||
char *message_string;
|
char *message_string;
|
||||||
|
|||||||
Reference in New Issue
Block a user