From 66b5477cc1909e57489f854939a524ce2cd0f479 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 10 Oct 2016 17:28:30 +0000 Subject: 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. --- cmd-resize-pane.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cmd-resize-pane.c') 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; } } -- cgit v1.2.3