middle click on a tab: confirm close if there is a foreground process

Fixes #149
master-1.22
ZenWalker 2016-11-18 11:05:49 +01:00
parent d4234710b5
commit 5f9f682483
1 changed files with 3 additions and 1 deletions

View File

@ -2896,12 +2896,14 @@ notebook_button_press_cb (GtkWidget *widget,
TerminalWindow *window) TerminalWindow *window)
{ {
TerminalWindowPrivate *priv = window->priv; TerminalWindowPrivate *priv = window->priv;
TerminalScreen *active_screen = priv->active_screen;
GtkNotebook *notebook = GTK_NOTEBOOK (widget); GtkNotebook *notebook = GTK_NOTEBOOK (widget);
GtkWidget *menu; GtkWidget *menu;
GtkAction *action; GtkAction *action;
int tab_clicked; int tab_clicked;
if (event->type == GDK_BUTTON_PRESS && event->button == 2) if ((event->type == GDK_BUTTON_PRESS && event->button == 2)
&& !(confirm_close_window_or_tab (window, active_screen)))
{ {
tab_clicked = find_tab_num_at_pos (notebook, event->x_root, event->y_root); tab_clicked = find_tab_num_at_pos (notebook, event->x_root, event->y_root);
if (tab_clicked >= 0) if (tab_clicked >= 0)