diff options
author | lolilolicon <lolilolicon@gmail.com> | 2012-01-10 23:39:04 -0500 |
---|---|---|
committer | James Cloos <cloos@jhcloos.com> | 2012-02-21 17:14:22 -0500 |
commit | 0d069c0edae83f70ac10fab1a3c04d8197e277c4 (patch) | |
tree | 82b11008b95bfbc957a338a5a2dd2b9e310afac9 | |
parent | 3e7b1528b1d8aa4b999789bccc5513ed5c3451f8 (diff) |
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 <cloos@jhcloos.com>
-rw-r--r-- | xprop.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) |