diff options
author | nicm <nicm> | 2013-10-10 12:08:14 +0000 |
---|---|---|
committer | nicm <nicm> | 2013-10-10 12:08:14 +0000 |
commit | d2160e3f838bc2f5c08dffc0f05bc27502668ed7 (patch) | |
tree | c5379921cf3a0e18d6df38fa4e79bca461b8b4c5 /layout.c | |
parent | b822d24b15669a0b7d325e2a2f04959b05a3d4fb (diff) |
mouse-resize-pane: Only resize on border select
The current behaviour of mouse-resize-pane is such that if the mouse
button is held down and a selection takes place within a pane, that if
the mouse pointer then hits a border edge, that pane-resize would
initiate.
This seems counter-intuitive; instead, check for a resize condition if
the border of a pane is selected, and in the case of mouse selection
within a pane, no longer resize the pane if edge of the border is hit.
By Thomas Adam.
Diffstat (limited to 'layout.c')
-rw-r--r-- | layout.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) { @@ -550,7 +553,7 @@ layout_resize_pane_mouse(struct client *c) } if (pane_border) server_redraw_window(w); - } else if (~m->event & MOUSE_EVENT_UP) { + } else if (m->event & MOUSE_EVENT_DOWN) { TAILQ_FOREACH(wp, &w->panes, entry) { if ((wp->xoff + wp->sx == m->x && wp->yoff <= 1 + m->y && |