From 21bca549d35b3d0b4ff1f22f66e5e108c103ac4b Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 10 Sep 2013 13:17:39 +0100 Subject: [PATCH] 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. --- layout.c | 3 +++ 1 file changed, 3 insertions(+) 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) {