diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-01-28 19:52:21 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-01-28 19:52:21 +0000 |
commit | 4428987e955da1c56d1fcd98d2130f6a02738f1a (patch) | |
tree | c17e6a8d9d907c28c39039346cf99d54a3cf4b93 /input-keys.c | |
parent | 70024b3685126195994313790c26359236889485 (diff) | |
download | rtmux-4428987e955da1c56d1fcd98d2130f6a02738f1a.tar.gz rtmux-4428987e955da1c56d1fcd98d2130f6a02738f1a.tar.bz2 rtmux-4428987e955da1c56d1fcd98d2130f6a02738f1a.zip |
* 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).
Diffstat (limited to 'input-keys.c')
-rw-r--r-- | input-keys.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/input-keys.c b/input-keys.c index 5f68f37c..68391147 100644 --- a/input-keys.c +++ b/input-keys.c @@ -1,4 +1,4 @@ -/* $Id: input-keys.c,v 1.24 2009-01-12 22:53:52 nicm Exp $ */ +/* $Id: input-keys.c,v 1.25 2009-01-28 19:52:21 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -205,3 +205,15 @@ input_key(struct window_pane *wp, int key) } buffer_write(wp->out, ike->data, dlen); } + +/* Handle input mouse. */ +void +input_mouse(struct window_pane *wp, u_char b, u_char x, u_char y) +{ + if (wp->screen->mode & MODE_MOUSE) { + buffer_write(wp->out, "\033[M", 3); + buffer_write8(wp->out, b + 32); + buffer_write8(wp->out, x + 33); + buffer_write8(wp->out, y + 33); + } +} |