aboutsummaryrefslogtreecommitdiff
path: root/layout.c
diff options
context:
space:
mode:
authorThomas <thomas@xteddy.org>2013-09-10 13:17:39 +0100
committerThomas <thomas@xteddy.org>2013-09-30 15:26:43 +0100
commit21bca549d35b3d0b4ff1f22f66e5e108c103ac4b (patch)
tree61b5b81677dbfbee3fe4f33f1689d92aa8d4d3f3 /layout.c
parentbda970b3b14d145fcaa25cf8f3f9a3cb70a864c3 (diff)
downloadrtmux-21bca549d35b3d0b4ff1f22f66e5e108c103ac4b.tar.gz
rtmux-21bca549d35b3d0b4ff1f22f66e5e108c103ac4b.tar.bz2
rtmux-21bca549d35b3d0b4ff1f22f66e5e108c103ac4b.zip
layout-resize-pane-mouse: Consider visible panes only
When a pane is maximized, and text is selected, we end up checking if a pane switch is needed. This therefore means we might end up selecting panes which aren't visible.
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/layout.c b/layout.c
index b74bd789..cf554c38 100644
--- a/layout.c
+++ b/layout.c
@@ -533,6 +533,9 @@ layout_resize_pane_mouse(struct client *c)
pane_border = 0;
if (m->event & MOUSE_EVENT_DRAG && m->flags & MOUSE_RESIZE_PANE) {
TAILQ_FOREACH(wp, &w->panes, entry) {
+ if (!window_pane_visible(wp))
+ continue;
+
if (wp->xoff + wp->sx == m->lx &&
wp->yoff <= 1 + m->ly &&
wp->yoff + wp->sy >= m->ly) {