blob: 3a459fa22232a9e3d78962b9a2d36cada935bebf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
From: Josselin Mouette <joss@debian.org>
Subject: Add support for switching tabs with alt+scroll
Bug-Debian: https://bugs.debian.org/640980
Index: webkitgtk/Source/WebKit/gtk/webkit/webkitwebview.cpp
===================================================================
--- webkitgtk.orig/Source/WebKit/gtk/webkit/webkitwebview.cpp
+++ webkitgtk/Source/WebKit/gtk/webkit/webkitwebview.cpp
@@ -813,6 +813,12 @@ static gboolean webkit_web_view_scroll_e
if (!frame.view())
return FALSE;
+#ifndef GTK_API_VERSION_2
+ /* Ignore Alt-scroll events in GTK3 so that GtkNotebook can use it to switch tabs */
+ if (event->state & GDK_MOD1_MASK)
+ return FALSE;
+#endif
+
PlatformWheelEvent wheelEvent(event);
return frame.eventHandler().handleWheelEvent(wheelEvent);
}
|