diff options
author | ZenWalker <[email protected]> | 2016-11-18 11:05:49 +0100 |
---|---|---|
committer | ZenWalker <[email protected]> | 2016-11-18 11:05:49 +0100 |
commit | 5f9f682483363724c08f596902fbf91a49ac1fb1 (patch) | |
tree | da07d3542ec3eeaca2f0f3b7345fa99f1c33954e | |
parent | d4234710b56581f862c9f0286055028237235ea1 (diff) | |
download | mate-terminal-5f9f682483363724c08f596902fbf91a49ac1fb1.tar.bz2 mate-terminal-5f9f682483363724c08f596902fbf91a49ac1fb1.tar.xz |
middle click on a tab: confirm close if there is a foreground process
Fixes #149
-rw-r--r-- | src/terminal-window.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/terminal-window.c b/src/terminal-window.c index b015820..7bdc0d1 100644 --- a/src/terminal-window.c +++ b/src/terminal-window.c @@ -2896,12 +2896,14 @@ notebook_button_press_cb (GtkWidget *widget, TerminalWindow *window) { TerminalWindowPrivate *priv = window->priv; + TerminalScreen *active_screen = priv->active_screen; GtkNotebook *notebook = GTK_NOTEBOOK (widget); GtkWidget *menu; GtkAction *action; 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); if (tab_clicked >= 0) |