From: Josselin Mouette Date: Thu, 31 May 2018 17:38:40 +0000 (+0100) Subject: Add support for switching tabs with alt+scroll X-Git-Tag: archive/raspbian/2.4.11-4+rpi1~1^2~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d7b988997c2a9d650dd4e4c4fa650d4c94b3d08b;p=webkitgtk.git Add support for switching tabs with alt+scroll =================================================================== Gbp-Pq: Name 02_notebook_scroll.patch --- diff --git a/Source/WebKit/gtk/webkit/webkitwebview.cpp b/Source/WebKit/gtk/webkit/webkitwebview.cpp index 087dafe..786673c 100644 --- a/Source/WebKit/gtk/webkit/webkitwebview.cpp +++ b/Source/WebKit/gtk/webkit/webkitwebview.cpp @@ -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); }