mirror of
https://github.com/tmux/tmux.git
synced 2026-06-04 00:56:17 +00:00
Merge branch 'floating_panes' into floating_panes_staging
This commit is contained in:
@@ -1480,6 +1480,7 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
|
|||||||
int px, py, wx, wy, ox, oy, sx, sy, sb_tty_y;
|
int px, py, wx, wy, ox, oy, sx, sy, sb_tty_y;
|
||||||
int xoff = wp->xoff;
|
int xoff = wp->xoff;
|
||||||
int yoff = wp->yoff;
|
int yoff = wp->yoff;
|
||||||
|
int sb_wy = sb_y; /* window coordinates */
|
||||||
struct visible_ranges *r;
|
struct visible_ranges *r;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1491,9 +1492,8 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
|
|||||||
ox = ctx->ox;
|
ox = ctx->ox;
|
||||||
oy = ctx->oy;
|
oy = ctx->oy;
|
||||||
if (ctx->statustop) {
|
if (ctx->statustop) {
|
||||||
sb_y += ctx->statuslines;
|
sb_y += ctx->statuslines; /* tty coordinates */
|
||||||
sy += ctx->statuslines; /* height of window */
|
sy += ctx->statuslines;
|
||||||
oy += ctx->statuslines; /* top of window */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gc = sb_style->gc;
|
gc = sb_style->gc;
|
||||||
@@ -1525,8 +1525,8 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* sb_y is a window coordinate; convert to tty coordinate by
|
* sb_y is in tty coordinate (window coord + statuslines when
|
||||||
* subtracting the pan offset oy.
|
* statustop). Subtract the pan offset oy to get the tty row.
|
||||||
*/
|
*/
|
||||||
sb_tty_y = sb_y - oy; /* scrollbar top in tty coordinates */
|
sb_tty_y = sb_y - oy; /* scrollbar top in tty coordinates */
|
||||||
if (sb_tty_y > (int)sy) {
|
if (sb_tty_y > (int)sy) {
|
||||||
@@ -1548,7 +1548,7 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (j = jmin; j < jmax; j++) {
|
for (j = jmin; j < jmax; j++) {
|
||||||
wy = sb_y + j; /* window y coordinate */
|
wy = sb_wy + j; /* window y coordinate */
|
||||||
py = sb_tty_y + j; /* tty y coordinate */
|
py = sb_tty_y + j; /* tty y coordinate */
|
||||||
r = tty_check_overlay_range(tty, sb_x, wy, imax);
|
r = tty_check_overlay_range(tty, sb_x, wy, imax);
|
||||||
r = screen_redraw_get_visible_ranges(wp, sb_x, wy, imax, r);
|
r = screen_redraw_get_visible_ranges(wp, sb_x, wy, imax, r);
|
||||||
|
|||||||
4
spawn.c
4
spawn.c
@@ -269,7 +269,8 @@ spawn_pane(struct spawn_context *sc, char **cause)
|
|||||||
sc->wp0->ictx = NULL;
|
sc->wp0->ictx = NULL;
|
||||||
new_wp = sc->wp0;
|
new_wp = sc->wp0;
|
||||||
new_wp->flags &= ~(PANE_STATUSREADY|PANE_STATUSDRAWN);
|
new_wp->flags &= ~(PANE_STATUSREADY|PANE_STATUSDRAWN);
|
||||||
} else if (sc->lc == NULL) {
|
} else {
|
||||||
|
if (sc->lc == NULL) {
|
||||||
new_wp = window_add_pane(w, NULL, hlimit, sc->flags);
|
new_wp = window_add_pane(w, NULL, hlimit, sc->flags);
|
||||||
layout_init(w, new_wp);
|
layout_init(w, new_wp);
|
||||||
} else {
|
} else {
|
||||||
@@ -286,6 +287,7 @@ spawn_pane(struct spawn_context *sc, char **cause)
|
|||||||
*/
|
*/
|
||||||
if (w->flags & WINDOW_ZOOMED)
|
if (w->flags & WINDOW_ZOOMED)
|
||||||
new_wp->saved_layout_cell = new_wp->layout_cell;
|
new_wp->saved_layout_cell = new_wp->layout_cell;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now we have a pane with nothing running in it ready for the new
|
* Now we have a pane with nothing running in it ready for the new
|
||||||
|
|||||||
7
window.c
7
window.c
@@ -644,17 +644,12 @@ window_get_active_at(struct window *w, u_int x, u_int y)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Floating - include top or or left border. */
|
/* Floating - include all borders. */
|
||||||
if ((int)x < xoff - 1 || x > xoff + sx)
|
if ((int)x < xoff - 1 || x > xoff + sx)
|
||||||
continue;
|
continue;
|
||||||
if (pane_status == PANE_STATUS_TOP) {
|
|
||||||
if ((int)y <= yoff - 2 || y > yoff + sy - 1)
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
if ((int)y < yoff - 1 || y > yoff + sy)
|
if ((int)y < yoff - 1 || y > yoff + sy)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return (wp);
|
return (wp);
|
||||||
}
|
}
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user