From: Christian Dywan Date: Fri, 19 Nov 2010 21:51:50 +0000 (+0100) Subject: Do middle click and menu on tabs on button press X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70de71d6a3f7592d70c4674c95b7d85cce1e1cf8;p=midori Do middle click and menu on tabs on button press Doing close on middle click on a tab can cause the new tab to be immediately closed because the mouse pointer happens to be released under the tab after it appears. --- diff --git a/midori/midori-view.c b/midori/midori-view.c index 55ef7c6e..39172e25 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -4348,9 +4348,9 @@ midori_view_get_tab_menu (MidoriView* view) } static gboolean -midori_view_tab_label_button_release_event (GtkWidget* tab_label, - GdkEventButton* event, - GtkWidget* widget) +midori_view_tab_label_button_press_event (GtkWidget* tab_label, + GdkEventButton* event, + GtkWidget* widget) { if (event->button == 2) { @@ -4581,8 +4581,8 @@ midori_view_get_proxy_tab_label (MidoriView* view) if (!view->close_buttons_on_tabs) gtk_widget_hide (view->tab_close); - g_signal_connect (event_box, "button-release-event", - G_CALLBACK (midori_view_tab_label_button_release_event), view); + g_signal_connect (event_box, "button-press-event", + G_CALLBACK (midori_view_tab_label_button_press_event), view); g_signal_connect (view->tab_close, "style-set", G_CALLBACK (midori_view_tab_icon_style_set_cb), NULL); g_signal_connect (view->tab_close, "clicked",