From 0d069c0edae83f70ac10fab1a3c04d8197e277c4 Mon Sep 17 00:00:00 2001 From: lolilolicon Date: Tue, 10 Jan 2012 23:39:04 -0500 Subject: Enable setting property of type UTF8_STRING. Fix "bad format character: u" error for format '8u', e.g.: xprop -root -f _NET_WM_NAME 8u -set _NET_WM_NAME LG3D Signed-off-by: James Cloos --- xprop.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xprop.c b/xprop.c index 4c4c702..2dbacb5 100644 --- a/xprop.c +++ b/xprop.c @@ -1629,6 +1629,13 @@ Set_Property (Display *dpy, Window w, const char *propname, const char *value) data = (unsigned char *) value; nelements = strlen(value); break; + case 'u': + if (size != 8) + Fatal_Error("can't use format character 'u' with any size except 8."); + type = XInternAtom(dpy, "UTF8_STRING", False); + data = (unsigned char *) value; + nelements = strlen(value); + break; case 't': { XTextProperty textprop; if (size != 8) -- cgit v1.2.3