From aae1685a440fb94d634c950033c9dcbbaae81f76 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Wed, 2 Mar 2011 16:21:26 +0000 Subject: Add backword and forward actions to mouse buttons 4 & 5. Can't test it because i don't have such a beast but it works with the buttons I do have. FS #58 --- xxxterm.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/xxxterm.c b/xxxterm.c index 1860cec..4c8d18d 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -5031,8 +5031,24 @@ struct cmd { gboolean wv_button_cb(GtkWidget *btn, GdkEventButton *e, struct tab *t) { + struct karg a; + hide_oops(t); + if (e->type == GDK_BUTTON_PRESS && e->button == 8 /* btn 4 */) { + /* go backward */ + a.i = XT_NAV_BACK; + navaction(t, &a); + + return (TRUE); + } else if (e->type == GDK_BUTTON_PRESS && e->button == 9 /* btn 5 */) { + /* go forward */ + a.i = XT_NAV_FORWARD; + navaction(t, &a); + + return (TRUE); + } + return (FALSE); } -- cgit 1.4.1-2-gfad0