wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

getprop_string.c (334B)


      1 /* Copyright ©2007-2010 Kris Maglione <maglione.k at Gmail>
      2  * See LICENSE file for license details.
      3  */
      4 #include "../x11.h"
      5 
      6 char*
      7 getprop_string(Window *w, const char *name) {
      8 	char **list, *str;
      9 	int n;
     10 
     11 	str = nil;
     12 
     13 	n = getprop_textlist(w, name, &list);
     14 	if(n > 0)
     15 		str = estrdup(*list);
     16 	freestringlist(list);
     17 
     18 	return str;
     19 }