summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/uicmd.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/uicmd.cc b/src/uicmd.cc
index 7f2226dd..b4835b8a 100644
--- a/src/uicmd.cc
+++ b/src/uicmd.cc
@@ -246,6 +246,18 @@ int CustTabs::handle(int e)
a_Timeout_add(0.0, a_UIcmd_close_all_bw, NULL);
ret = 1;
}
+ } else if (e == FL_MOUSEWHEEL) {
+ /* Move to the next or previous tab using the mouse wheel */
+ int dx = Fl::event_dx();
+ int dy = Fl::event_dy();
+ int dir = dy ? dy : dx;
+
+ if (dir > 0)
+ next_tab();
+ else if (dir < 0)
+ prev_tab();
+
+ ret = 1;
}
return (ret) ? ret : Fl_Group::handle(e);