diff options
author | TingPing <tingping@tingping.se> | 2014-01-08 09:03:50 -0500 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2014-01-08 09:03:50 -0500 |
commit | aae6633c28ddcdad834f5ad0fe4f890e96c2afa0 (patch) | |
tree | 5eebf33524510497d3a7780c9bf7ad0c544cfffb /src/fe-gtk/maingui.c | |
parent | 91ea5b6907ccb570818d0e91a98afbe59cdaf57e (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.c | 5 |
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) |