X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=otk%2Futil.cc;h=a2b784e7b5a01427ed1bc2b8d32ed48ad0f83207;hb=5168a8add5ed46f74b615ecc60738c1113606734;hp=a3ec0034ac35e9105d1a8a1a6086303c3e52f9ea;hpb=e8f5cf2940667a60698d28fe0cae208792357676;p=chaz%2Fopenbox diff --git a/otk/util.cc b/otk/util.cc index a3ec0034..a2b784e7 100644 --- a/otk/util.cc +++ b/otk/util.cc @@ -7,6 +7,10 @@ extern "C" { #include +#ifdef HAVE_STDIO_H +#include +#endif + #ifdef HAVE_STRING_H #include #endif @@ -61,30 +65,6 @@ void bexec(const string& command, const string& displaystring) { } -string textPropertyToString(Display *display, XTextProperty& text_prop) { - string ret; - - if (text_prop.value && text_prop.nitems > 0) { - if (text_prop.encoding == XA_STRING) { - ret = (char *) text_prop.value; - } else { - text_prop.nitems = strlen((char *) text_prop.value); - - char **list; - int num; - if (XmbTextPropertyToTextList(display, &text_prop, - &list, &num) == Success && - num > 0 && *list) { - ret = *list; - XFreeStringList(list); - } - } - } - - return ret; -} - - string itostring(unsigned long i) { if (i == 0) return string("0");