Add support for switching tabs with alt+scroll
authorJosselin Mouette <joss@debian.org>
Wed, 14 Sep 2016 16:40:06 +0000 (16:40 +0000)
committerRaspbian forward porter <root@raspbian.org>
Wed, 14 Sep 2016 16:40:06 +0000 (16:40 +0000)
===================================================================

Gbp-Pq: Name 02_notebook_scroll.patch

Source/WebKit/gtk/webkit/webkitwebview.cpp

index 087dafe95d71b324bc91652d9f3441175aa97435..786673c2a9123412f70b12ffc4e6210cf3e6924f 100644 (file)
@@ -813,6 +813,12 @@ static gboolean webkit_web_view_scroll_event(GtkWidget* widget, GdkEventScroll*
     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);
 }