version 1.9, 2009/07/13 10:43:52 |
version 1.10, 2009/07/14 07:23:36 |
|
|
window_set_active_pane(struct window *w, struct window_pane *wp) |
window_set_active_pane(struct window *w, struct window_pane *wp) |
{ |
{ |
w->active = wp; |
w->active = wp; |
while (w->active->flags & PANE_HIDDEN) |
|
|
while (!window_pane_visible(w->active)) { |
w->active = TAILQ_PREV(w->active, window_panes, entry); |
w->active = TAILQ_PREV(w->active, window_panes, entry); |
|
if (w->active == NULL) |
|
w->active = TAILQ_LAST(&w->panes, window_panes); |
|
if (w->active == wp) |
|
return; |
|
} |
} |
} |
|
|
struct window_pane * |
struct window_pane * |
|
|
wp->mode->mouse(wp, c, b, x, y); |
wp->mode->mouse(wp, c, b, x, y); |
} else |
} else |
input_mouse(wp, b, x, y); |
input_mouse(wp, b, x, y); |
|
} |
|
|
|
int |
|
window_pane_visible(struct window_pane *wp) |
|
{ |
|
struct window *w = wp->window; |
|
|
|
if (wp->xoff >= w->sx || wp->yoff >= w->sy) |
|
return (0); |
|
if (wp->xoff + wp->sx > w->sx || wp->yoff + wp->sy > w->sy) |
|
return (0); |
|
return (1); |
} |
} |
|
|
char * |
char * |