aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <descalante@igalia.com>2010-02-16 14:48:56 +0800
committerDiego Escalante Urrelo <descalante@igalia.com>2010-02-17 02:14:39 +0800
commit0e3eaec0ea23d4e4b2c006c82d92bb8a4027a726 (patch)
tree54bcbc0227fca8027948b4676a5a220ec2904599 /embed
parent4f5d35180aa54b87e4bd9298a6e80eba0967ba59 (diff)
downloadgsoc2013-epiphany-0e3eaec0ea23d4e4b2c006c82d92bb8a4027a726.tar.gz
gsoc2013-epiphany-0e3eaec0ea23d4e4b2c006c82d92bb8a4027a726.tar.zst
gsoc2013-epiphany-0e3eaec0ea23d4e4b2c006c82d92bb8a4027a726.zip
ephy-web-view: be precise in what modifiers to catch
In ephy_web_view_button_press_event we are being too liberal with "&" when checking for modifiers, we want == so we don't prevent handling elsewhere. Also explain the function a bit more. Bug #604950
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-web-view.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 4de5938a1..7f2a493e1 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -519,14 +519,18 @@ ephy_web_view_key_press_event (GtkWidget *widget, GdkEventKey *event)
static gboolean
ephy_web_view_button_press_event (GtkWidget *widget, GdkEventButton *event)
{
- /* We always show the browser context menu on control-rightclick */
- if (event->button == 3 && event->state & GDK_CONTROL_MASK)
+ /* This are the special cases WebkitWebView doesn't handle but we have an
+ * interest in handling. */
+
+ /* We always show the browser context menu on control-rightclick. */
+ if (event->button == 3 && event->state == GDK_CONTROL_MASK)
return FALSE;
- /* We use this for downloading */
- if (event->button == 1 && event->state & GDK_SHIFT_MASK)
+ /* We use this for downloading. */
+ if (event->button == 1 && event->state == GDK_SHIFT_MASK)
return FALSE;
+ /* Let WebKitWebView handle this. */
return GTK_WIDGET_CLASS (ephy_web_view_parent_class)->button_press_event (widget, event);
}