summary refs log tree commit diff stats
path: root/src/fe-gtk/maingui.c
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-01-02 18:03:32 -0500
committerTingPing <tingping@tingping.se>2014-01-02 18:03:32 -0500
commit537fb85696031182cb6a79879a0f5e7ce6374779 (patch)
treea650f1b92294acd27dcc26ccdd2885458d916e88 /src/fe-gtk/maingui.c
parent2bd1c3f99d7782d7208f48ce11867093b711afb8 (diff)
Bind middle-click to close tab
Closes #832
Diffstat (limited to 'src/fe-gtk/maingui.c')
-rw-r--r--src/fe-gtk/maingui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index 0f8db0bf..4bd5d370 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -1605,8 +1605,8 @@ mg_create_tabmenu (session *sess, GdkEventButton *event, chan *ch)
 static gboolean
 mg_tab_contextmenu_cb (chanview *cv, chan *ch, int tag, gpointer ud, GdkEventButton *event)
 {
-	/* shift-click to close a tab */
-	if ((event->state & STATE_SHIFT) && event->type == GDK_BUTTON_PRESS)
+	/* middle-click or shift-click to close a tab */
+	if ((event->button == 2 || event->state & STATE_SHIFT) && event->type == GDK_BUTTON_PRESS)
 	{
 		mg_xbutton_cb (cv, ch, tag, ud);
 		return FALSE;