aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-06-30 15:00:32 (GMT)
committerfluxgen <fluxgen>2003-06-30 15:00:32 (GMT)
commit790c861b6065f3193b97602c753596506b845107 (patch)
tree03fcc1132de4f371929d6f432d6f026efb84f546 /src
parente516527b60e90f32cfdb5022aa42d1a0adb98ab2 (diff)
downloadfluxbox_paul-790c861b6065f3193b97602c753596506b845107.zip
fluxbox_paul-790c861b6065f3193b97602c753596506b845107.tar.bz2
using default key screen if no screen num was specified
Diffstat (limited to 'src')
-rw-r--r--src/FbCommands.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc
index 820517d..6dee267 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -19,11 +19,12 @@
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.9 2003/06/22 14:16:25 fluxgen Exp $ 22// $Id: FbCommands.cc,v 1.10 2003/06/30 15:00:32 fluxgen Exp $
23 23
24#include "FbCommands.hh" 24#include "FbCommands.hh"
25#include "fluxbox.hh" 25#include "fluxbox.hh"
26#include "FbTk/Theme.hh" 26#include "FbTk/Theme.hh"
27#include "Screen.hh"
27 28
28#include <sys/types.h> 29#include <sys/types.h>
29#include <unistd.h> 30#include <unistd.h>
@@ -43,7 +44,16 @@ void ExecuteCmd::execute() {
43 std::string displaystring("DISPLAY="); 44 std::string displaystring("DISPLAY=");
44 displaystring += DisplayString(FbTk::App::instance()->display()); 45 displaystring += DisplayString(FbTk::App::instance()->display());
45 char intbuff[64]; 46 char intbuff[64];
46 sprintf(intbuff, "%d", m_screen_num); 47 int screen_num = m_screen_num;
48 if (screen_num < 0) {
49 if (Fluxbox::instance()->keyScreen() == 0)
50 screen_num = 0;
51 else
52 screen_num = Fluxbox::instance()->keyScreen()->screenNumber();
53 }
54
55 sprintf(intbuff, "%d", screen_num);
56
47 // remove last number of display and add screen num 57 // remove last number of display and add screen num
48 displaystring.erase(displaystring.size()-1); 58 displaystring.erase(displaystring.size()-1);
49 displaystring += intbuff; 59 displaystring += intbuff;