version 1.53, 2011/04/18 19:49:05 |
version 1.54, 2011/04/19 21:31:33 |
|
|
if (key == KEYC_MOUSE) { |
if (key == KEYC_MOUSE) { |
if (c->flags & CLIENT_READONLY) |
if (c->flags & CLIENT_READONLY) |
return; |
return; |
if (options_get_number(oo, "mouse-select-pane")) { |
if (options_get_number(oo, "mouse-select-pane") && |
|
((!(mouse->b & MOUSE_DRAG) && mouse->b != MOUSE_UP) || |
|
wp->mode != &window_copy_mode)) { |
|
/* |
|
* Allow pane switching in copy mode only by mouse down |
|
* (click). |
|
*/ |
window_set_active_at(w, mouse->x, mouse->y); |
window_set_active_at(w, mouse->x, mouse->y); |
server_redraw_window_borders(w); |
server_redraw_window_borders(w); |
wp = w->active; |
wp = w->active; |
|
|
struct window_pane *wp = w->active; |
struct window_pane *wp = w->active; |
struct screen *s = wp->screen; |
struct screen *s = wp->screen; |
struct options *oo = &c->session->options; |
struct options *oo = &c->session->options; |
|
struct options *wo = &w->options; |
int status, mode; |
int status, mode; |
|
|
tty_region(&c->tty, 0, c->tty.sy - 1); |
tty_region(&c->tty, 0, c->tty.sy - 1); |
|
|
* none. |
* none. |
*/ |
*/ |
mode = s->mode; |
mode = s->mode; |
if (TAILQ_NEXT(TAILQ_FIRST(&w->panes), entry) != NULL && |
if ((mode & ALL_MOUSE_MODES) == 0) { |
options_get_number(oo, "mouse-select-pane") && |
if (TAILQ_NEXT(TAILQ_FIRST(&w->panes), entry) != NULL && |
(mode & ALL_MOUSE_MODES) == 0) |
options_get_number(oo, "mouse-select-pane") == 0) |
mode |= MODE_MOUSE_STANDARD; |
mode |= MODE_MOUSE_STANDARD; |
|
else if (options_get_number(oo, "mouse-select-window")) |
if (options_get_number(oo, "mouse-select-window") && |
mode |= MODE_MOUSE_STANDARD; |
(mode & ALL_MOUSE_MODES) == 0) |
else if (options_get_number(wo, "mode-mouse")) |
mode |= MODE_MOUSE_STANDARD; |
mode |= MODE_MOUSE_STANDARD; |
|
} |
|
|
/* |
/* |
* Set UTF-8 mouse input if required. If the terminal is UTF-8, the |
* Set UTF-8 mouse input if required. If the terminal is UTF-8, the |