diff options
author | okan <okan> | 2010-05-22 22:10:31 +0000 |
---|---|---|
committer | okan <okan> | 2010-05-22 22:10:31 +0000 |
commit | 72e6d2d0a9e3f1ac1c2fc52e03648c625b07a49c (patch) | |
tree | dd5bd9a49efd4c2b1b28eeac52353fcf22609a23 /client.c | |
parent | a292c96977547511316acc8e20798f7c2b1edb19 (diff) | |
download | cwm-72e6d2d0a9e3f1ac1c2fc52e03648c625b07a49c.tar.gz cwm-72e6d2d0a9e3f1ac1c2fc52e03648c625b07a49c.tar.xz cwm-72e6d2d0a9e3f1ac1c2fc52e03648c625b07a49c.zip |
replace XFetchName() with something more intelligent which attempts to
use the appropriate netwm Atom first, as well as deal with utf8. slightly different incarnation tested by sthen@ and ajacoutot@ - thanks! ok oga@
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client.c b/client.c index d2c89c9..95d9d75 100644 --- a/client.c +++ b/client.c @@ -183,7 +183,7 @@ client_delete(struct client_ctx *cc) while ((wn = TAILQ_FIRST(&cc->nameq)) != NULL) { TAILQ_REMOVE(&cc->nameq, wn, entry); if (wn->name != emptystring) - XFree(wn->name); + xfree(wn->name); xfree(wn); } @@ -523,7 +523,8 @@ client_setname(struct client_ctx *cc) struct winname *wn; char *newname; - XFetchName(X_Dpy, cc->win, &newname); + if (!xu_getstrprop(cc->win, _NET_WM_NAME, &newname)) + xu_getstrprop(cc->win, XA_WM_NAME, &newname); if (newname == NULL) newname = emptystring; @@ -549,7 +550,7 @@ match: assert(wn != NULL); TAILQ_REMOVE(&cc->nameq, wn, entry); if (wn->name != emptystring) - XFree(wn->name); + xfree(wn->name); xfree(wn); cc->nameqlen--; } |