From: Josselin Mouette Date: Mon, 28 May 2018 13:17:22 +0000 (+0100) Subject: Add support for switching tabs with alt+scroll X-Git-Tag: archive/raspbian/2.4.11-4+rpi1~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c7761fde989ee898a8e99ed0525d0faa84e9d628;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); }