diff options
author | Marco Peereboom <marco@conformal.com> | 2011-03-02 16:21:26 +0000 |
---|---|---|
committer | Marco Peereboom <marco@conformal.com> | 2011-03-02 16:21:26 +0000 |
commit | aae1685a440fb94d634c950033c9dcbbaae81f76 (patch) | |
tree | 39d9b2f40e69b0b1019598e4111c87167a5717e9 | |
parent | f4171a46d94742c29dff5366d5ddff5705c4980c (diff) | |
download | xombrero-aae1685a440fb94d634c950033c9dcbbaae81f76.tar.gz |
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
-rw-r--r-- | xxxterm.c | 16 |
1 files changed, 16 insertions, 0 deletions
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); } |