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-08 09:03:50 -0500
committerTingPing <tingping@tingping.se>2014-01-08 09:03:50 -0500
commitaae6633c28ddcdad834f5ad0fe4f890e96c2afa0 (patch)
tree5eebf33524510497d3a7780c9bf7ad0c544cfffb /src/fe-gtk/maingui.c
parent91ea5b6907ccb570818d0e91a98afbe59cdaf57e (diff)
Don't select tab while closing with middle-click
Also fix unused warning and ignore shift right click
Diffstat (limited to 'src/fe-gtk/maingui.c')
-rw-r--r--src/fe-gtk/maingui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index 4bd5d370..0186e944 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -1606,10 +1606,11 @@ static gboolean
 mg_tab_contextmenu_cb (chanview *cv, chan *ch, int tag, gpointer ud, GdkEventButton *event)
 {
 	/* middle-click or shift-click to close a tab */
-	if ((event->button == 2 || event->state & STATE_SHIFT) && event->type == GDK_BUTTON_PRESS)
+	if ((event->button == 2 || (event->button == 1 && event->state & STATE_SHIFT))
+		&& event->type == GDK_BUTTON_PRESS)
 	{
 		mg_xbutton_cb (cv, ch, tag, ud);
-		return FALSE;
+		return TRUE;
 	}
 
 	if (event->button != 3)