- if (!PROP_GETS(self->window, sm_client_id, locale, &self->sm_client_id) &&
- self->group) {
- ob_debug_type(OB_DEBUG_SM, "Client %s does not have session id\n",
- self->title);
- if (!PROP_GETS(self->group->leader, sm_client_id, locale,
- &self->sm_client_id)) {
- ob_debug_type(OB_DEBUG_SM, "Client %s does not have session id on "
- "group window\n", self->title);
- } else
- ob_debug_type(OB_DEBUG_SM, "Client %s has session id on "
- "group window\n", self->title);
- } else
- ob_debug_type(OB_DEBUG_SM, "Client %s has session id\n",
- self->title);
+ if (!PROP_GETS(self->window, sm_client_id, locale, &self->sm_client_id))
+ if (self->group)
+ PROP_GETS(self->group->leader, sm_client_id, locale,
+ &self->sm_client_id);
+}
+
+void client_update_command(ObClient *self)
+{
+ gchar **data;
+
+ g_free(self->wm_command);
+ self->wm_command = NULL;
+
+ if (PROP_GETSS(self->window, wm_command, locale, &data)) {
+ /* merge/mash them all together */
+ gchar *merge = NULL;
+ gint i;
+
+ for (i = 0; data[i]; ++i) {
+ gchar *tmp = merge;
+ if (merge)
+ merge = g_strconcat(merge, data[i], NULL);
+ else
+ merge = g_strconcat(data[i], NULL);
+ g_free(tmp);
+ }
+ g_strfreev(data);
+
+ self->wm_command = merge;
+ }