mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 21:56:57 +00:00
Sync OpenBSD patchset 373:
New option, mouse-select-pane. If on, the mouse may be used to select the current pane. Suggested by sthen@ and also by someone else ages ago who I have forgotten.
This commit is contained in:
19
window.c
19
window.c
@ -1,4 +1,4 @@
|
||||
/* $Id: window.c,v 1.111 2009-10-11 23:38:16 tcunha Exp $ */
|
||||
/* $Id: window.c,v 1.112 2009-10-11 23:46:02 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -302,6 +302,23 @@ window_set_active_pane(struct window *w, struct window_pane *wp)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
window_set_active_at(struct window *w, u_int x, u_int y)
|
||||
{
|
||||
struct window_pane *wp;
|
||||
|
||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||
if (!window_pane_visible(wp))
|
||||
continue;
|
||||
if (x < wp->xoff || x >= wp->xoff + wp->sx)
|
||||
continue;
|
||||
if (y < wp->yoff || y >= wp->yoff + wp->sy)
|
||||
continue;
|
||||
window_set_active_pane(w, wp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
struct window_pane *
|
||||
window_add_pane(struct window *w, u_int hlimit)
|
||||
{
|
||||
|
Reference in New Issue
Block a user