diff options
author | nicm <nicm> | 2016-10-10 17:28:30 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-10-10 17:28:30 +0000 |
commit | 66b5477cc1909e57489f854939a524ce2cd0f479 (patch) | |
tree | e117e660a72ba31b41e1734a15b73ada3933f051 /cmd-resize-pane.c | |
parent | 7d4b416fe690b062f02097e95dbb7619a6fb05fe (diff) | |
download | rtmux-66b5477cc1909e57489f854939a524ce2cd0f479.tar.gz rtmux-66b5477cc1909e57489f854939a524ce2cd0f479.tar.bz2 rtmux-66b5477cc1909e57489f854939a524ce2cd0f479.zip |
Do not allow the opposite pane to resize when dragging with the mouse
because it is not possible to keep the mouse on the border when the
minimum size is reached.
Diffstat (limited to 'cmd-resize-pane.c')
-rw-r--r-- | cmd-resize-pane.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd-resize-pane.c b/cmd-resize-pane.c index 7ec65f10..fa52ab14 100644 --- a/cmd-resize-pane.c +++ b/cmd-resize-pane.c @@ -111,13 +111,13 @@ cmd_resize_pane_exec(struct cmd *self, struct cmd_q *cmdq) } if (args_has(self->args, 'L')) - layout_resize_pane(wp, LAYOUT_LEFTRIGHT, -adjust); + layout_resize_pane(wp, LAYOUT_LEFTRIGHT, -adjust, 1); else if (args_has(self->args, 'R')) - layout_resize_pane(wp, LAYOUT_LEFTRIGHT, adjust); + layout_resize_pane(wp, LAYOUT_LEFTRIGHT, adjust, 1); else if (args_has(self->args, 'U')) - layout_resize_pane(wp, LAYOUT_TOPBOTTOM, -adjust); + layout_resize_pane(wp, LAYOUT_TOPBOTTOM, -adjust, 1); else if (args_has(self->args, 'D')) - layout_resize_pane(wp, LAYOUT_TOPBOTTOM, adjust); + layout_resize_pane(wp, LAYOUT_TOPBOTTOM, adjust, 1); server_redraw_window(wl->window); return (CMD_RETURN_NORMAL); @@ -155,12 +155,12 @@ cmd_resize_pane_mouse_update(struct client *c, struct mouse_event *m) if (wp->xoff + wp->sx == m->lx && wp->yoff <= 1 + ly && wp->yoff + wp->sy >= ly) { - layout_resize_pane(wp, LAYOUT_LEFTRIGHT, m->x - m->lx); + layout_resize_pane(wp, LAYOUT_LEFTRIGHT, m->x - m->lx, 0); found = 1; } if (wp->yoff + wp->sy == ly && wp->xoff <= 1 + m->lx && wp->xoff + wp->sx >= m->lx) { - layout_resize_pane(wp, LAYOUT_TOPBOTTOM, y - ly); + layout_resize_pane(wp, LAYOUT_TOPBOTTOM, y - ly, 0); found = 1; } } |