X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=3e10554b4eefd69056235bb63b644ec5fbade45c;hb=c4e4760c41f10aae6af19a4363cb247c71edee4b;hp=a685c11e0fa0c26f33f16908a908c1744a0e9524;hpb=b317f0140398308fce5fbd262ad99a290b54a449;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index a685c11e..3e10554b 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1,3 +1,21 @@ +/* -*- indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*- + + client.c for the Openbox window manager + Copyright (c) 2003 Ben Jansens + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + See the COPYING file for a copy of the GNU General Public License. +*/ + #include "client.h" #include "debug.h" #include "startupnotify.h" @@ -461,6 +479,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 +696,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 +2815,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