Le vendredi 09 septembre 2011 à 09:42 +0200, Josselin Mouette a écrit : > gtk+3.0 in Debian has been patched so that the alt+scroll wheel > combination triggers tab switching, from anywhere in the area of a > GtkNotebook. > > However, for this to work, it requires the event to be ignored on > children widgets. VTE has already been patched for that effect, and the > attached patch brings the same feature to Webkit. > > Try it with epiphany, I think the result is awesome.
And it’s even better with the patch. -- .''`. Josselin Mouette : :' : `. `' `-
Index: webkitgtk+-1.4.2/Source/WebKit/gtk/webkit/webkitwebview.cpp =================================================================== --- webkitgtk+-1.4.2.orig/Source/WebKit/gtk/webkit/webkitwebview.cpp 2011-09-08 15:58:40.196491146 +0200 +++ webkitgtk+-1.4.2/Source/WebKit/gtk/webkit/webkitwebview.cpp 2011-09-08 16:43:29.337637688 +0200 @@ -933,6 +933,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); }
signature.asc
Description: This is a digitally signed message part