aboutsummaryrefslogtreecommitdiff
path: root/src/CurrentWindowCmd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r--src/CurrentWindowCmd.cc25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc
index dfb5c19..6cb5c08 100644
--- a/src/CurrentWindowCmd.cc
+++ b/src/CurrentWindowCmd.cc
@@ -52,12 +52,8 @@ FbTk::Command<void> *createCurrentWindowCmd(const std::string &command,
52 return new CurrentWindowCmd(&FluxboxWindow::maximizeHorizontal); 52 return new CurrentWindowCmd(&FluxboxWindow::maximizeHorizontal);
53 else if (command == "raise") 53 else if (command == "raise")
54 return new CurrentWindowCmd(&FluxboxWindow::raise); 54 return new CurrentWindowCmd(&FluxboxWindow::raise);
55 else if (command == "raiselayer")
56 return new CurrentWindowCmd(&FluxboxWindow::raiseLayer);
57 else if (command == "lower") 55 else if (command == "lower")
58 return new CurrentWindowCmd(&FluxboxWindow::lower); 56 return new CurrentWindowCmd(&FluxboxWindow::lower);
59 else if (command == "lowerlayer")
60 return new CurrentWindowCmd(&FluxboxWindow::lowerLayer);
61 else if (command == "close") 57 else if (command == "close")
62 return new CurrentWindowCmd(&FluxboxWindow::close); 58 return new CurrentWindowCmd(&FluxboxWindow::close);
63 else if (command == "killwindow" || command == "kill") 59 else if (command == "killwindow" || command == "kill")
@@ -95,9 +91,7 @@ REGISTER_COMMAND_PARSER(maximize, createCurrentWindowCmd, void);
95REGISTER_COMMAND_PARSER(maximizevertical, createCurrentWindowCmd, void); 91REGISTER_COMMAND_PARSER(maximizevertical, createCurrentWindowCmd, void);
96REGISTER_COMMAND_PARSER(maximizehorizontal, createCurrentWindowCmd, void); 92REGISTER_COMMAND_PARSER(maximizehorizontal, createCurrentWindowCmd, void);
97REGISTER_COMMAND_PARSER(raise, createCurrentWindowCmd, void); 93REGISTER_COMMAND_PARSER(raise, createCurrentWindowCmd, void);
98REGISTER_COMMAND_PARSER(raiselayer, createCurrentWindowCmd, void);
99REGISTER_COMMAND_PARSER(lower, createCurrentWindowCmd, void); 94REGISTER_COMMAND_PARSER(lower, createCurrentWindowCmd, void);
100REGISTER_COMMAND_PARSER(lowerlayer, createCurrentWindowCmd, void);
101REGISTER_COMMAND_PARSER(close, createCurrentWindowCmd, void); 95REGISTER_COMMAND_PARSER(close, createCurrentWindowCmd, void);
102REGISTER_COMMAND_PARSER(killwindow, createCurrentWindowCmd, void); 96REGISTER_COMMAND_PARSER(killwindow, createCurrentWindowCmd, void);
103REGISTER_COMMAND_PARSER(kill, createCurrentWindowCmd, void); 97REGISTER_COMMAND_PARSER(kill, createCurrentWindowCmd, void);
@@ -466,6 +460,25 @@ void SetLayerCmd::real_execute() {
466 fbwindow().moveToLayer(m_layer); 460 fbwindow().moveToLayer(m_layer);
467} 461}
468 462
463FbTk::Command<void> *ChangeLayerCmd::parse(const string &command,
464 const string &args, bool trusted) {
465 int num = 2;
466 FbTk_istringstream iss(args.c_str());
467 iss >> num;
468 if (command == "raiselayer")
469 return new ChangeLayerCmd(-num);
470 else if (command == "lowerlayer")
471 return new ChangeLayerCmd(num);
472 return 0;
473}
474
475REGISTER_COMMAND_PARSER(raiselayer, ChangeLayerCmd::parse, void);
476REGISTER_COMMAND_PARSER(lowerlayer, ChangeLayerCmd::parse, void);
477
478void ChangeLayerCmd::real_execute() {
479 fbwindow().changeLayer(m_diff);
480}
481
469namespace { 482namespace {
470class SetTitleDialog: public TextDialog, public FbTk::Observer { 483class SetTitleDialog: public TextDialog, public FbTk::Observer {
471public: 484public: