diff options
author | Josh Rickmar <jrick@conformal.com> | 2013-06-13 20:28:44 -0400 |
---|---|---|
committer | Josh Rickmar <jrick@conformal.com> | 2013-06-14 11:52:29 -0400 |
commit | 4c7f54e2754778831b3b0dfd0ab6deb9a444648b (patch) | |
tree | 3b3fc1f6fb2e97f12d0c0c1ffc98ced0ffa1627b | |
parent | 93c26d123c1f446ad1bb8c87124c8b9fc82be48a (diff) | |
download | xombrero-4c7f54e2754778831b3b0dfd0ab6deb9a444648b.tar.gz |
Close tab when press+releasing X, not just press down
-rw-r--r-- | xombrero.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/xombrero.c b/xombrero.c index 57bc59a..978ca7d 100644 --- a/xombrero.c +++ b/xombrero.c @@ -3492,15 +3492,12 @@ wv_button_cb(GtkWidget *btn, GdkEventButton *e, struct tab *t) return (FALSE); } -gboolean -tab_close_cb(GtkWidget *btn, GdkEventButton *e, struct tab *t) +void +tab_close_cb(GtkWidget *btn, struct tab *t) { DNPRINTF(XT_D_TAB, "tab_close_cb: tab %d\n", t->tab_id); - if (e->type == GDK_BUTTON_PRESS && e->button == 1) - delete_tab(t); - - return (FALSE); + delete_tab(t); } int @@ -7876,8 +7873,7 @@ create_new_tab(const char *title, struct undo *u, int focus, int position) // "signal-after::key-press-event", G_CALLBACK(wv_keypress_after_cb), t, // (char *)NULL); - g_signal_connect(G_OBJECT(bb), "button_press_event", - G_CALLBACK(tab_close_cb), t); + g_signal_connect(G_OBJECT(bb), "clicked", G_CALLBACK(tab_close_cb), t); /* setup history */ t->bfl = webkit_web_view_get_back_forward_list(t->wv); |