[fusion-commits] Compiz mirror: Changes to 'master' (3b60a2a6fda5273f368530e1d8ccc5796dacfe1e)
compiz at server.opencompositing.org
compiz at server.opencompositing.org
Tue May 13 07:00:07 CEST 2008
New commits:
commit 3b60a2a6fda5273f368530e1d8ccc5796dacfe1e
Author: Danny Baumann <dannybaumann at web.de>
Date: Tue May 13 06:58:19 2008 +0200
Minor coding style cleanup.
commit 6ac5066cf6b11b738a4ee896bf90a5460831d9b3
Author: Lubos Lunak <llunak at novell.com>
Date: Tue May 13 06:56:53 2008 +0200
Save program name to session manager.
Don't save --replace command line argument.
src/session.c | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
Modified: compiz/src/session.c
===================================================================
--- compiz/src/session.c
+++ compiz/src/session.c
@@ -95,6 +95,8 @@ setCloneRestartCommands (SmcConn connection)
{
if (strcmp (programArgv[i], "--sm-client-id") == 0)
i++; /* skip old client id, we'll add the new one later */
+ else if (strcmp (programArgv[i], "--replace") == 0)
+ continue; /* there's nothing to replace when starting session */
else
args[count++] = programArgv[i];
}
@@ -115,7 +117,8 @@ setCloneRestartCommands (SmcConn connection)
}
static void
-setRestartStyle (SmcConn connection, char hint)
+setRestartStyle (SmcConn connection,
+ char hint)
{
SmProp prop, *pProp;
SmPropValue propVal;
@@ -133,6 +136,25 @@ setRestartStyle (SmcConn connection, char hint)
}
static void
+setProgram (SmcConn connection,
+ const char *program)
+{
+ SmProp prop, *pProp;
+ SmPropValue propVal;
+
+ prop.name = SmProgram;
+ prop.type = SmARRAY8;
+ prop.num_vals = 1;
+ prop.vals = &propVal;
+ propVal.value = (SmPointer) program;
+ propVal.length = strlen (program);
+
+ pProp = ∝
+
+ SmcSetProperties (connection, 1, &pProp);
+}
+
+static void
saveYourselfCallback (SmcConn connection,
SmPointer client_data,
int saveType,
@@ -162,6 +184,7 @@ saveYourselfCallback (SmcConn connection,
setCloneRestartCommands (connection);
setRestartStyle (connection, SmRestartImmediately);
+ setProgram (connection, programName);
SmcSaveYourselfDone (connection, 1);
}
More information about the commits
mailing list