X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=otk%2Fdisplay.cc;h=98288bd02dcdf54990437673a55fb1e9d14264f4;hb=7d3b12d931ed48d3577b92ba3c246e76f7a881e7;hp=33dca01bdb38daf12a19de42caa152b62fbe3486;hpb=1729df46b5da2e04df6779e158707531ce1cae6d;p=chaz%2Fopenbox diff --git a/otk/display.cc b/otk/display.cc index 33dca01b..98288bd0 100644 --- a/otk/display.cc +++ b/otk/display.cc @@ -7,6 +7,7 @@ #include "display.hh" #include "screeninfo.hh" #include "gccache.hh" +#include "util.hh" extern "C" { #include @@ -27,10 +28,6 @@ extern "C" { # include #endif // HAVE_STDIO_H -#ifdef HAVE_STDLIB_H -# include -#endif // HAVE_STDLIB_H - #ifdef HAVE_SIGNAL_H # include #endif // HAVE_SIGNAL_H @@ -110,11 +107,7 @@ line argument.\n\n")); // set the DISPLAY environment variable for any lauched children, to the // display we're using, so they open in the right place. // XXX rm -> std::string dtmp = "DISPLAY=" + DisplayString(display); - if (putenv(const_cast((std::string("DISPLAY=") + - DisplayString(display)).c_str()))) { - printf(_("warning: couldn't set environment variable 'DISPLAY'\n")); - perror("putenv()"); - } + putenv(std::string("DISPLAY=") + DisplayString(display)); // find the availability of X extensions we like to use #ifdef XKB