mirror of
https://github.com/tmux/tmux.git
synced 2026-01-11 16:30:22 +00:00
Bugfix floating panes display when off window edge.
This commit is contained in:
11
window.c
11
window.c
@@ -599,7 +599,8 @@ struct window_pane *
|
||||
window_get_active_at(struct window *w, u_int x, u_int y)
|
||||
{
|
||||
struct window_pane *wp;
|
||||
u_int xoff, yoff, sx, sy;
|
||||
int xoff, yoff;
|
||||
u_int sx, sy;
|
||||
|
||||
TAILQ_FOREACH(wp, &w->z_index, zentry) {
|
||||
if (!window_pane_visible(wp))
|
||||
@@ -608,15 +609,15 @@ window_get_active_at(struct window *w, u_int x, u_int y)
|
||||
if (wp->layout_cell != NULL) {
|
||||
/* Tiled, select up to including bottom or
|
||||
right border. */
|
||||
if (x < xoff || x > xoff + sx)
|
||||
if ((int)x < xoff || x > xoff + sx)
|
||||
continue;
|
||||
if (y < yoff || y > yoff + sy)
|
||||
if ((int)y < yoff || y > yoff + sy)
|
||||
continue;
|
||||
} else {
|
||||
/* Floating, include top or or left border. */
|
||||
if (x < xoff - 1 || x > xoff + sx)
|
||||
if ((int)x < xoff - 1 || x > xoff + sx)
|
||||
continue;
|
||||
if (y < yoff - 1 || y > yoff + sy)
|
||||
if ((int)y < yoff - 1 || y > yoff + sy)
|
||||
continue;
|
||||
}
|
||||
return (wp);
|
||||
|
||||
Reference in New Issue
Block a user