summaryrefslogtreecommitdiff
path: root/src/FbCommands.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbCommands.cc')
-rw-r--r--src/FbCommands.cc21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc
index e7d1986..a2a1aa8 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbCommands.cc,v 1.24 2004/04/22 21:12:32 fluxgen Exp $ 22// $Id: FbCommands.cc,v 1.25 2004/07/19 13:52:15 fluxgen Exp $
23 23
24#include "FbCommands.hh" 24#include "FbCommands.hh"
25#include "fluxbox.hh" 25#include "fluxbox.hh"
@@ -37,6 +37,15 @@
37 37
38#include <fstream> 38#include <fstream>
39#include <iostream> 39#include <iostream>
40
41#ifdef HAVE_CONFIG_H
42#include "config.h"
43#endif // HAVE_CONFIG_H
44
45#if defined(__EMX__) && defined(HAVE_PROCESS_H)
46#include <process.h> // for P_NOWAIT
47#endif // __EMX__
48
40using namespace std; 49using namespace std;
41 50
42namespace FbCommands { 51namespace FbCommands {
@@ -46,7 +55,7 @@ ExecuteCmd::ExecuteCmd(const std::string &cmd, int screen_num):m_cmd(cmd), m_scr
46} 55}
47 56
48void ExecuteCmd::execute() { 57void ExecuteCmd::execute() {
49#ifndef __EMX__ 58#ifndef __EMX__
50 if (! fork()) { 59 if (! fork()) {
51 std::string displaystring("DISPLAY="); 60 std::string displaystring("DISPLAY=");
52 displaystring += DisplayString(FbTk::App::instance()->display()); 61 displaystring += DisplayString(FbTk::App::instance()->display());
@@ -70,7 +79,7 @@ void ExecuteCmd::execute() {
70 exit(0); 79 exit(0);
71 } 80 }
72#else // __EMX__ 81#else // __EMX__
73 spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", item->exec().c_str(), 0); 82 spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", m_cmd.c_str(), 0);
74#endif // !__EMX__ 83#endif // !__EMX__
75 84
76} 85}
@@ -125,9 +134,9 @@ void ShowRootMenuCmd::execute() {
125 int wx, wy; 134 int wx, wy;
126 unsigned int mask; 135 unsigned int mask;
127 136
128 if ( XQueryPointer(FbTk::App::instance()->display(), 137 if (XQueryPointer(FbTk::App::instance()->display(),
129 screen->rootWindow().window(), &root_ret, &window_ret, 138 screen->rootWindow().window(), &root_ret, &window_ret,
130 &rx, &ry, &wx, &wy, &mask) ) { 139 &rx, &ry, &wx, &wy, &mask) ) {
131 140
132 if ( rx - (screen->getRootmenu().width()/2) > 0 ) 141 if ( rx - (screen->getRootmenu().width()/2) > 0 )
133 rx-= screen->getRootmenu().width()/2; 142 rx-= screen->getRootmenu().width()/2;