[Xfce4-commits] <xfce4-terminal:master> Fix terminal session restore.
Nick Schermer
noreply at xfce.org
Sun Dec 22 21:52:01 CET 2013
Updating branch refs/heads/master
to b117dd5653f156272f439b086e8b833fb67c5ded (commit)
from 2b5ad8048dd3feae11c3c2342a09c338ef129385 (commit)
commit b117dd5653f156272f439b086e8b833fb67c5ded
Author: Gregory Margo <gmargo at yahoo.com>
Date: Mon Dec 16 09:25:19 2013 -0800
Fix terminal session restore.
terminal/terminal-app.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/terminal/terminal-app.c b/terminal/terminal-app.c
index 7290b0b..66dcd64 100644
--- a/terminal/terminal-app.c
+++ b/terminal/terminal-app.c
@@ -774,16 +774,17 @@ terminal_app_process (TerminalApp *app,
if (G_UNLIKELY (attrs == NULL))
return FALSE;
+ /* Connect to session manager first before starting any other windows */
for (lp = attrs; lp != NULL; lp = lp->next)
{
attr = lp->data;
/* take first sm client id */
- if (sm_client_id == NULL && attr->sm_client_id != NULL)
- sm_client_id = g_strdup (attr->sm_client_id);
-
- terminal_app_open_window (app, attr);
- terminal_window_attr_free (attr);
+ if (attr->sm_client_id != NULL)
+ {
+ sm_client_id = g_strdup (attr->sm_client_id);
+ break;
+ }
}
if (G_LIKELY (app->session_client == NULL))
@@ -808,6 +809,14 @@ terminal_app_process (TerminalApp *app,
}
}
+ for (lp = attrs; lp != NULL; lp = lp->next)
+ {
+ attr = lp->data;
+
+ terminal_app_open_window (app, attr);
+ terminal_window_attr_free (attr);
+ }
+
g_slist_free (attrs);
g_free (sm_client_id);
More information about the Xfce4-commits
mailing list