summaryrefslogtreecommitdiff
path: root/openbox/session.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-13 22:57:42 +0000
committerDana Jansens <danakj@orodu.net>2007-05-13 22:57:42 +0000
commit5c96972bfffacb7dc24c96673f85e413e5c87b94 (patch)
tree10dac41b7257f5769613d863695071583ce81cc7 /openbox/session.c
parent6171dbf970c2c4f8d9736a8ae5184eb9ac38d7ce (diff)
save the config type in the session command line arguments
Diffstat (limited to 'openbox/session.c')
-rw-r--r--openbox/session.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/openbox/session.c b/openbox/session.c
index b07f1694..7a9a081d 100644
--- a/openbox/session.c
+++ b/openbox/session.c
@@ -319,12 +319,15 @@ static void session_setup_clone_command()
static void session_setup_restart_command()
{
gint i;
+ gint num = 4;
- SmPropValue *vals = g_new(SmPropValue, sm_argc + 4);
+ if (ob_config_type) num += 2;
+
+ SmPropValue *vals = g_new(SmPropValue, sm_argc + num);
SmProp prop = {
.name = g_strdup(SmRestartCommand),
.type = g_strdup(SmLISTofARRAY8),
- .num_vals = sm_argc + 4,
+ .num_vals = sm_argc + num,
.vals = vals
};
SmProp *list = &prop;
@@ -350,11 +353,22 @@ static void session_setup_restart_command()
ob_debug_type(OB_DEBUG_SM, " %s\n", vals[i+2].value);
ob_debug_type(OB_DEBUG_SM, " %s\n", vals[i+3].value);
+ if (ob_config_type) {
+ vals[i+4].value = g_strdup("--config-namespace");
+ vals[i+4].length = strlen("--config-namespace") + 1;
+ vals[i+5].value = ob_config_type;
+ vals[i+5].length = strlen(ob_config_type) + 1;
+ ob_debug_type(OB_DEBUG_SM, " %s\n", vals[i+4].value);
+ ob_debug_type(OB_DEBUG_SM, " %s\n", vals[i+5].value);
+ }
+
SmcSetProperties(sm_conn, 1, &list);
g_free(prop.name);
g_free(prop.type);
g_free(vals[i].value);
g_free(vals[i+2].value);
+ if (ob_config_type)
+ g_free(vals[i+4].value);
g_free(vals);
}