all repos — openbox @ 9f2a844beb62287e12e75bf207e4c55bc14b6209

openbox fork - make it a bit more like ryudo

watch for windows with titlecounts changing their title and getting an incorrect titlecount
Dana Jansens danakj@orodu.net
commit

9f2a844beb62287e12e75bf207e4c55bc14b6209

parent

e9d878f47dfd70e495754459dbef24c37ea96de1

1 files changed, 9 insertions(+), 2 deletions(-)

jump to
M openbox/client.copenbox/client.c

@@ -1308,16 +1308,21 @@ {

GList *it; guint32 nums; guint i; - char *data = NULL; + gchar *data = NULL; gboolean read_title; + gchar *old_title; - g_free(self->title); + old_title = self->title; /* try netwm */ if (!PROP_GETS(self->window, net_wm_name, utf8, &data)) /* try old x stuff */ if (!PROP_GETS(self->window, wm_name, locale, &data)) data = g_strdup("Unnamed Window"); + + /* did the title change? then reset the title_count */ + if (old_title && 0 != strncmp(old_title, data, strlen(data))) + self->title_count = 1; /* look for duplicates and append a number */ nums = 0;

@@ -1348,6 +1353,8 @@ self->title = data;

if (self->frame) frame_adjust_title(self->frame); + + g_free(old_title); /* update the icon title */ data = NULL;