]> spindle.queued.net Git - midori/commitdiff
Propagate button press event explicitly from the view
authorMichael Opitz <naxat88@gmail.com>
Sat, 6 Jun 2009 22:48:19 +0000 (00:48 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 6 Jun 2009 22:48:19 +0000 (00:48 +0200)
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
midori/midori-view.c

index b7e2b251af6b4c3d4d83331511acc281f9251fcc..88d7a8969984b0b0862a554280ad7452bdd848e1 100644 (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)
index 84806ad816a37a3e7b8ffab8d4620dff8b8dab3c..1b3f4f63674e33a10c5f0a21f79160a147083d3e 100644 (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;
 }