From: Michael Opitz Date: Sat, 6 Jun 2009 22:48:19 +0000 (+0200) Subject: Propagate button press event explicitly from the view X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=891d89e3fd30a1c94b62a4c13820e869b919acc6;p=midori 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. --- 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; }