]> Dogcows Code - chaz/openbox/blobdiff - util/epist/screen.cc
exec stuff with "exec " so the sh isnt left over in memory for each process
[chaz/openbox] / util / epist / screen.cc
index 1ccf9833d0be96b75d3bb7b01718e6d32ca88489..8f9fbe3c02605483caf76fa5399c93b006c9bec3 100644 (file)
@@ -360,7 +360,7 @@ void screen::updateClientList() {
         break;
     if (it == end) {  // didn't already exist
       if (doAddWindow(rootclients[i])) {
-        cout << "Added window: 0x" << hex << rootclients[i] << dec << endl;
+        //cout << "Added window: 0x" << hex << rootclients[i] << dec << endl;
         _clients.insert(insert_point, new XWindow(_epist, this,
                                                   rootclients[i]));
       }
@@ -374,7 +374,7 @@ void screen::updateClientList() {
       if (**it2 == rootclients[i])
         break;
     if (i == num)  { // no longer exists
-      cout << "Removed window: 0x" << hex << (*it2)->window() << dec << endl;
+      //cout << "Removed window: 0x" << hex << (*it2)->window() << dec << endl;
       delete *it2;
       _clients.erase(it2);
     }
@@ -397,9 +397,9 @@ void screen::updateActiveWindow() {
   }
   _active = it;
 
-  cout << "Active window is now: ";
-  if (_active == _clients.end()) cout << "None\n";
-  else cout << "0x" << hex << (*_active)->window() << dec << endl;
+  //cout << "Active window is now: ";
+  //if (_active == _clients.end()) cout << "None\n";
+  //else cout << "0x" << hex << (*_active)->window() << dec << endl;
 }
 
 
@@ -408,10 +408,11 @@ void screen::execCommand(const std::string &cmd) const {
   if ((pid = fork()) == 0) {
     extern char **environ;
 
+    string c = "exec " + cmd;
     char *const argv[] = {
       "sh",
       "-c",
-      const_cast<char *>(cmd.c_str()),
+      const_cast<char *>(c.c_str()),
       0
     };
     // make the command run on the correct screen
This page took 0.022016 seconds and 4 git commands to generate.