* Better support for at least the most common variant of mouse input: parse it and adjust for different panes. Also support mouse in window/session choice mode.

* Bring back the fancy window titles with session/window names: it is easy to work around problems with elinks (see FAQ).
This commit is contained in:
Nicholas Marriott
2009-01-28 19:52:21 +00:00
parent 70024b3685
commit 4428987e95
16 changed files with 202 additions and 103 deletions

View File

@ -1,4 +1,4 @@
/* $Id: window.c,v 1.63 2009-01-26 22:57:20 nicm Exp $ */
/* $Id: window.c,v 1.64 2009-01-28 19:52:21 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -659,8 +659,26 @@ window_pane_parse(struct window_pane *wp)
void
window_pane_key(struct window_pane *wp, struct client *c, int key)
{
if (wp->mode != NULL)
wp->mode->key(wp, c, key);
else
if (wp->mode != NULL) {
if (wp->mode->key != NULL)
wp->mode->key(wp, c, key);
} else
input_key(wp, key);
}
void
window_pane_mouse(
struct window_pane *wp, struct client *c, u_char b, u_char x, u_char y)
{
/* XXX convert from 1-based? */
if (y < wp->yoff || y >= wp->yoff + wp->sy)
return;
y -= wp->yoff;
if (wp->mode != NULL) {
if (wp->mode->mouse != NULL)
wp->mode->mouse(wp, c, b, x, y);
} else
input_mouse(wp, b, x, y);
}