[epiphany-extensions] push-scroller: allow middle_click_open_url



commit 9c01dae8920948987a1d4ef5d67ed66143ffa603
Author: Diego Escalante Urrelo <descalante igalia com>
Date:   Fri Jan 22 12:37:55 2010 -0500

    push-scroller: allow middle_click_open_url
    
    Push scroller was eating double middle clicks which broke the preference
    middle_click_open_url.
    
    Bug #477349

 .../push-scroller/ephy-push-scroller-extension.c   |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/extensions/push-scroller/ephy-push-scroller-extension.c b/extensions/push-scroller/ephy-push-scroller-extension.c
index 8e750fc..3de7fd6 100644
--- a/extensions/push-scroller/ephy-push-scroller-extension.c
+++ b/extensions/push-scroller/ephy-push-scroller-extension.c
@@ -63,16 +63,16 @@ dom_mouse_down_cb (EphyWebView *view,
 	EphyPushScroller *scroller;
 	EphyEmbed *embed;
 	guint context;
-	guint button;
 	WebKitHitTestResult *hit_test;
 
 	embed = EPHY_EMBED (EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (GTK_WIDGET (view)));
-	button = event->button;
 	hit_test = webkit_web_view_get_hit_test_result (WEBKIT_WEB_VIEW (view), event);
 	g_object_get (hit_test, "context", &context, NULL);
 	g_object_unref (hit_test);
 
-	if (button != 2 || (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE) ||
+	if (event->button != 2 ||
+	    event->type != GDK_BUTTON_PRESS ||
+	    (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE) ||
 	    (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK))
 	{
 		return FALSE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]