summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-09-14 14:19:05 +0300
committermonsta <[email protected]>2016-09-14 14:19:05 +0300
commit622e2d1272bf2d7a99d147482ae6a51b0a77f188 (patch)
treeb7d6323fdc251b17593ad1014cba7a0c0fc61039 /src
parent8d2eb0898154f2624e2ae34039169f307a3411a5 (diff)
downloadmate-terminal-622e2d1272bf2d7a99d147482ae6a51b0a77f188.tar.bz2
mate-terminal-622e2d1272bf2d7a99d147482ae6a51b0a77f188.tar.xz
handle GDK_SCROLL_SMOOTH when handling mouse scroll on tabs
adapted from: https://git.gnome.org/browse/gnome-terminal/commit/?id=70965e71db7d1c2fac0237988344972b564c46b5 https://git.gnome.org/browse/gnome-terminal/commit/?id=35a509165750d0ecefe9f26702d0f3c0e230f0c2
Diffstat (limited to 'src')
-rw-r--r--src/terminal-window.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 132b98b..e0004c3 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -2931,6 +2931,24 @@ notebook_scroll_event_cb (GtkWidget *widget,
case GDK_SCROLL_UP:
gtk_notebook_prev_page (notebook);
break;
+ case GDK_SCROLL_SMOOTH:
+ switch (gtk_notebook_get_tab_pos (notebook)) {
+ case GTK_POS_LEFT:
+ case GTK_POS_RIGHT:
+ if (event->delta_y > 0)
+ gtk_notebook_next_page (notebook);
+ else if (event->delta_y < 0)
+ gtk_notebook_prev_page (notebook);
+ break;
+ case GTK_POS_TOP:
+ case GTK_POS_BOTTOM:
+ if (event->delta_x > 0)
+ gtk_notebook_next_page (notebook);
+ else if (event->delta_x < 0)
+ gtk_notebook_prev_page (notebook);
+ break;
+ }
+ break;
}
return TRUE;