aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorokan2010-05-22 22:10:31 +0000
committerokan2010-05-22 22:10:31 +0000
commit8a70adb0c9439e853b0688eecfa1c041c2e20598 (patch)
tree0437ed3aeeb7314799e92f7937abac7af08dd24a /client.c
parent282d00dd063bedb53871f1b8a3dd09c3d4edc55f (diff)
downloadcwm-8a70adb0c9439e853b0688eecfa1c041c2e20598.tar.gz
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 '')
-rw-r--r--client.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/client.c b/client.c
index a7beb2e..dd28608 100644
--- a/client.c
+++ b/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: client.c,v 1.75 2010/04/11 16:51:26 okan Exp $
+ * $Id: client.c,v 1.76 2010/05/22 22:10:31 okan Exp $
*/
#include <sys/param.h>
@@ -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--;
}