summaryrefslogtreecommitdiff
path: root/otk/display.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-11 11:16:36 +0000
committerDana Jansens <danakj@orodu.net>2003-01-11 11:16:36 +0000
commite8f5cf2940667a60698d28fe0cae208792357676 (patch)
tree2dc2879b9c6e1e6c303ac0595d3eb6cfcbc113b5 /otk/display.cc
parentbc88d310fea71823fb2c61d071ff499579bffaba (diff)
valgrind fixes, and fixes for writing shit all over the environment. yay~!!!!!!!
Diffstat (limited to 'otk/display.cc')
-rw-r--r--otk/display.cc11
1 files changed, 2 insertions, 9 deletions
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 <X11/keysym.h>
@@ -27,10 +28,6 @@ extern "C" {
# include <stdio.h>
#endif // HAVE_STDIO_H
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif // HAVE_STDLIB_H
-
#ifdef HAVE_SIGNAL_H
# include <signal.h>
#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<char*>((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