diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-04-20 15:44:27 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-04-20 15:44:27 +0100 |
commit | b25dc423b0b1369aaec5dee8e051d541bd55043f (patch) | |
tree | 4ee106369e8b28504959d1b43c56daf89e196240 /layout.c | |
parent | acb8248ba64e1c9770d39d9790439c74eb9e5d80 (diff) | |
parent | 0fd9a97202dc2878d9cf21f3bea01b599c21e61b (diff) | |
download | rtmux-b25dc423b0b1369aaec5dee8e051d541bd55043f.tar.gz rtmux-b25dc423b0b1369aaec5dee8e051d541bd55043f.tar.bz2 rtmux-b25dc423b0b1369aaec5dee8e051d541bd55043f.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'layout.c')
-rw-r--r-- | layout.c | 52 |
1 files changed, 0 insertions, 52 deletions
@@ -519,58 +519,6 @@ layout_resize_pane(struct window_pane *wp, enum layout_type type, int change) notify_window_layout_changed(wp->window); } -/* Resize pane based on mouse events. */ -void -layout_resize_pane_mouse(struct client *c) -{ - struct window *w; - struct window_pane *wp; - struct mouse_event *m = &c->tty.mouse; - int pane_border; - - w = c->session->curw->window; - - 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) { - layout_resize_pane(wp, LAYOUT_LEFTRIGHT, - m->x - m->lx); - pane_border = 1; - } - if (wp->yoff + wp->sy == m->ly && - wp->xoff <= 1 + m->lx && - wp->xoff + wp->sx >= m->lx) { - layout_resize_pane(wp, LAYOUT_TOPBOTTOM, - m->y - m->ly); - pane_border = 1; - } - } - if (pane_border) - server_redraw_window(w); - } 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 && - wp->yoff + wp->sy >= m->y) || - (wp->yoff + wp->sy == m->y && - wp->xoff <= 1 + m->x && - wp->xoff + wp->sx >= m->x)) { - pane_border = 1; - } - } - } - if (pane_border) - m->flags |= MOUSE_RESIZE_PANE; - else - m->flags &= ~MOUSE_RESIZE_PANE; -} - /* Helper function to grow pane. */ int layout_resize_pane_grow( |