summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher James Halse Rogers <chalserogers@gmail.com>2007-09-23 13:28:41 +1000
committerChristopher James Halse Rogers <chalserogers@gmail.com>2007-09-23 13:28:41 +1000
commit7b5ed23271646a43d8b4064d21960a161b2a21d6 (patch)
tree1e3e586e57c538ba44953d57a32767ea0dee0e03
parent782d173328d3389d329e4a337e26afad7754641f (diff)
parent1b539095f21ba5c6914bea8ca249a5998b2e8a62 (diff)
downloadsession-xdg-7b5ed23271646a43d8b4064d21960a161b2a21d6.tar.gz
session-xdg-7b5ed23271646a43d8b4064d21960a161b2a21d6.tar.bz2
Merge branch 'master' of git://anongit.compiz-fusion.org/users/amaranth/session
-rw-r--r--session.c24
-rw-r--r--session.xml.in22
2 files changed, 25 insertions, 21 deletions
diff --git a/session.c b/session.c
index b14bb62..b5dd618 100644
--- a/session.c
+++ b/session.c
@@ -170,12 +170,13 @@ sessionGetClientId (CompWindow *w)
text.nitems = 0;
clientId = NULL;
+ clientLeader = w->clientLeader;
- if (w->clientLeader == w->id)
+ if (clientLeader == w->id)
return NULL;
//try to find clientLeader on transient parents
- if (w->clientLeader == None)
+ if (clientLeader == None)
{
CompWindow *window;
window = w;
@@ -253,6 +254,9 @@ sessionForeachWindow (CompDisplay *d, SessionWindowFunc func, void *user_data)
clientId = sessionGetClientId (w);
+ if (clientId == NULL)
+ continue;
+
name = sessionGetWindowName (d, w->id);
(* func) (w, clientId, name, user_data);
@@ -265,9 +269,6 @@ sessionWriteWindow (CompWindow *w, char *clientId, char *name, void *user_data)
{
FILE *outfile = (FILE*) user_data;
- if (clientId == NULL)
- return;
-
fprintf (outfile, " <window id=\"%s\" title=\"%s\" class=\"%s\" name=\"%s\">\n",
clientId,
name ? name : "",
@@ -407,8 +408,8 @@ sessionReadWindow (CompWindow *w, char *clientId, char *name, void *user_data)
xmlNodePtr cur;
xmlChar *newName;
xmlChar *newClientId;
- Bool foundWindow = FALSE;
- xmlNodePtr root = (xmlNodePtr) user_data;
+ Bool foundWindow = FALSE;
+ xmlNodePtr root = (xmlNodePtr) user_data;
if (clientId == NULL)
return;
@@ -417,7 +418,6 @@ sessionReadWindow (CompWindow *w, char *clientId, char *name, void *user_data)
{
if (xmlStrcmp (cur->name, BAD_CAST "window") == 0)
{
- printf ("checking window\n");
newClientId = xmlGetProp (cur, BAD_CAST "id");
if (newClientId != NULL)
{
@@ -449,7 +449,6 @@ sessionReadWindow (CompWindow *w, char *clientId, char *name, void *user_data)
{
if (xmlStrcmp (cur->name, BAD_CAST "geometry") == 0)
{
- printf ("setting geometry\n");
double x, y, width, height;
x = sessionGetIntForProp (cur, "x");
@@ -808,7 +807,7 @@ static int
sessionInitDisplay (CompPlugin *p, CompDisplay *d)
{
SessionDisplay *sd;
- char *previousId = NULL;
+ char *previousId;
int i;
sd = malloc (sizeof (SessionDisplay));
@@ -826,7 +825,10 @@ sessionInitDisplay (CompPlugin *p, CompDisplay *d)
{
if (strcmp(programArgv[i], "--sm-client-id") == 0)
{
- previousId = programArgv[++i];
+ i++;
+ printf ("%s\n", programArgv[i]);
+ previousId = malloc (strlen (programArgv[i]) + 1);
+ previousId = strdup (programArgv[i]);
break;
}
}
diff --git a/session.xml.in b/session.xml.in
index 67e4d49..c2ecc2e 100644
--- a/session.xml.in
+++ b/session.xml.in
@@ -1,14 +1,16 @@
<compiz>
- <plugin name="session">
- <deps>
- <relation type="before">
- <plugin>ccp</plugin>
- </relation>
- </deps>
- <_short>Session Management</_short>
- <_long>Talk to session manager and save/load window state</_long>
- <category>Utility</category>
- </plugin>
+ <plugin name="session">
+ <deps>
+ <relation type="before">
+ <plugin>ccp</plugin>
+ <plugin>gconf</plugin>
+ <plugin>kconfig</plugin>
+ </relation>
+ </deps>
+ <_short>Session Management</_short>
+ <_long>Talk to session manager and save/load window state</_long>
+ <category>Utility</category>
+ </plugin>
</compiz>