Bug#640980: webkitgtk+: Please add support for switching tab with alt+scroll

2011-09-09 Thread Josselin Mouette
Package: webkitgtk+
Version: 1.4.2-2
Severity: wishlist
Tags: patch

Hi,

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.

More info: https://bugzilla.gnome.org/show_bug.cgi?id=145244

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- 
 .''`.  Josselin Mouette
: :' :
`. `'
  `-



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#640980: webkitgtk+: Please add support for switching tab with alt+scroll

2011-09-09 Thread Josselin Mouette
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