From 891d89e3fd30a1c94b62a4c13820e869b919acc6 Mon Sep 17 00:00:00 2001 From: Michael Opitz Date: Sun, 7 Jun 2009 00:48:19 +0200 Subject: [PATCH] Propagate button press event explicitly from the view Apparently the button events tend to be stuck and not properly propagated, so we resort to emitting the signal ourselves. --- extensions/mouse-gestures/main.c | 2 +- midori/midori-view.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/mouse-gestures/main.c b/extensions/mouse-gestures/main.c index b7e2b251..88d7a896 100644 --- a/extensions/mouse-gestures/main.c +++ b/extensions/mouse-gestures/main.c @@ -44,7 +44,7 @@ static gboolean mouse_gestures_handle_events (GtkWidget *widget, MidoriBrowser *browser) { /* A button was pressed */ - if (event->type == GDK_BUTTON_PRESS) + if (event->type == GDK_BUTTON_PRESS && event->button.button == 2) { /* If the gesture was previously cleaned, start a new gesture and coordinates */ if (gesture->last == MOUSE_BUTTON_UNSET) diff --git a/midori/midori-view.c b/midori/midori-view.c index 84806ad8..1b3f4f63 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -1016,6 +1016,9 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view, return TRUE; } + /* We propagate the event, since it may otherwise be stuck in WebKit */ + g_signal_emit_by_name (view, "event", event, &background); + return FALSE; }