Sync OpenBSD patchset 846:

Only set a mouse mode for mouse-select-pane if none already set by the
mode (any will do).
This commit is contained in:
Tiago Cunha
2011-01-21 23:56:53 +00:00
parent 332bfbf273
commit 1930181b18
2 changed files with 16 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $Id: server-client.c,v 1.52 2011-01-21 23:44:13 tcunha Exp $ */
/* $Id: server-client.c,v 1.53 2011-01-21 23:56:53 tcunha Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@ -448,9 +448,14 @@ server_client_reset_state(struct client *c)
else
tty_cursor(&c->tty, wp->xoff + s->cx, wp->yoff + s->cy);
/*
* Any mode will do for mouse-select-pane, but set standard mode if
* none.
*/
mode = s->mode;
if (TAILQ_NEXT(TAILQ_FIRST(&w->panes), entry) != NULL &&
options_get_number(oo, "mouse-select-pane"))
options_get_number(oo, "mouse-select-pane") &&
(mode & ALL_MOUSE_MODES) == 0)
mode |= MODE_MOUSE_STANDARD;
/*