[Xfce4-commits] [apps/xfce4-terminal] 01/01: Add new tab to the currently active window
noreply at xfce.org
noreply at xfce.org
Mon Oct 2 15:44:47 CEST 2017
This is an automated email from the git hooks/post-receive script.
f 2 4 0 4 p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-terminal.
commit 3ffb63b0aa271d124411eb4758176856cd1081aa
Author: Igor <f2404 at yandex.ru>
Date: Mon Oct 2 09:41:24 2017 -0400
Add new tab to the currently active window
Not to the last opened one. Applies to the '--tab' command.
Fixes bug #13891
---
terminal/terminal-app.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/terminal/terminal-app.c b/terminal/terminal-app.c
index 0eaf9c4..00fa893 100644
--- a/terminal/terminal-app.c
+++ b/terminal/terminal-app.c
@@ -740,11 +740,19 @@ terminal_app_open_window (TerminalApp *app,
gtk_window_set_screen (GTK_WINDOW (window), screen);
}
}
- else if (attr->reuse_last_window
- && app->windows != NULL)
+ else if (attr->reuse_last_window && app->windows != NULL)
{
- /* open the tabs in an existing window */
+ /* open tabs in the existing window */
window = app->windows->data;
+ /* try to find active window (bug #13891) */
+ for (lp = app->windows; lp != NULL; lp = lp->next)
+ {
+ if (gtk_window_has_toplevel_focus (GTK_WINDOW (lp->data)))
+ {
+ window = lp->data;
+ break;
+ }
+ }
reuse_window = TRUE;
}
else
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list