X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=59af202a6d426a9b28d14eb41da3c36026161ad7;hb=ec4c9b0c1f22eee6ded4578c9448fab353b010cf;hp=a685c11e0fa0c26f33f16908a908c1744a0e9524;hpb=b317f0140398308fce5fbd262ad99a290b54a449;p=chaz%2Fopenbox 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