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.
This commit is contained in:
Michael Opitz 2009-06-07 00:48:19 +02:00 committed by Christian Dywan
parent 246fc03151
commit 891d89e3fd
2 changed files with 4 additions and 1 deletions

View file

@ -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)

View file

@ -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;
}