summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-09-15 06:50:25 +0000
committerDana Jansens <danakj@orodu.net>2003-09-15 06:50:25 +0000
commit3e9d050ffe36fa08c1e3e6f610c4d6587d2fdadd (patch)
tree514e8ae087e424235aba47b20a51f939994f6143 /openbox/client.c
parent9e746b64390277e06c4be0b6afd863841cebed3e (diff)
save the sm_client_id just like saving other properties, dont query each time its needed
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/openbox/client.c b/openbox/client.c
index a685c11e..59af202a 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -461,6 +461,7 @@ void client_unmanage(ObClient *self)
g_free(self->name);
g_free(self->class);
g_free(self->role);
+ g_free(self->sm_client_id);
g_free(self);
/* update the list hints */
@@ -677,6 +678,7 @@ static void client_get_all(ObClient *self)
client_update_title(self);
client_update_class(self);
+ client_update_sm_client_id(self);
client_update_strut(self);
client_update_icons(self);
}
@@ -2795,13 +2797,15 @@ ObClient *client_search_transient(ObClient *self, ObClient *search)
return NULL;
}
-gchar* client_get_sm_client_id(ObClient *self)
+void client_update_sm_client_id(ObClient *self)
{
- gchar *id = NULL;
+ g_free(self->sm_client_id);
+ self->sm_client_id = NULL;
- if (!PROP_GETS(self->window, sm_client_id, locale, &id) && self->group)
- PROP_GETS(self->group->leader, sm_client_id, locale, &id);
- return id;
+ if (!PROP_GETS(self->window, sm_client_id, locale, &self->sm_client_id) &&
+ self->group)
+ PROP_GETS(self->group->leader, sm_client_id, locale,
+ &self->sm_client_id);
}
/* finds the nearest edge in the given direction from the current client