From 0e3eaec0ea23d4e4b2c006c82d92bb8a4027a726 Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Tue, 16 Feb 2010 01:48:56 -0500 Subject: 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 --- embed/ephy-web-view.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'embed/ephy-web-view.c') 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); } -- cgit