diff options
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r-- | src/CurrentWindowCmd.cc | 25 |
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); | |||
95 | REGISTER_COMMAND_PARSER(maximizevertical, createCurrentWindowCmd, void); | 91 | REGISTER_COMMAND_PARSER(maximizevertical, createCurrentWindowCmd, void); |
96 | REGISTER_COMMAND_PARSER(maximizehorizontal, createCurrentWindowCmd, void); | 92 | REGISTER_COMMAND_PARSER(maximizehorizontal, createCurrentWindowCmd, void); |
97 | REGISTER_COMMAND_PARSER(raise, createCurrentWindowCmd, void); | 93 | REGISTER_COMMAND_PARSER(raise, createCurrentWindowCmd, void); |
98 | REGISTER_COMMAND_PARSER(raiselayer, createCurrentWindowCmd, void); | ||
99 | REGISTER_COMMAND_PARSER(lower, createCurrentWindowCmd, void); | 94 | REGISTER_COMMAND_PARSER(lower, createCurrentWindowCmd, void); |
100 | REGISTER_COMMAND_PARSER(lowerlayer, createCurrentWindowCmd, void); | ||
101 | REGISTER_COMMAND_PARSER(close, createCurrentWindowCmd, void); | 95 | REGISTER_COMMAND_PARSER(close, createCurrentWindowCmd, void); |
102 | REGISTER_COMMAND_PARSER(killwindow, createCurrentWindowCmd, void); | 96 | REGISTER_COMMAND_PARSER(killwindow, createCurrentWindowCmd, void); |
103 | REGISTER_COMMAND_PARSER(kill, createCurrentWindowCmd, void); | 97 | REGISTER_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 | ||
463 | FbTk::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 | |||
475 | REGISTER_COMMAND_PARSER(raiselayer, ChangeLayerCmd::parse, void); | ||
476 | REGISTER_COMMAND_PARSER(lowerlayer, ChangeLayerCmd::parse, void); | ||
477 | |||
478 | void ChangeLayerCmd::real_execute() { | ||
479 | fbwindow().changeLayer(m_diff); | ||
480 | } | ||
481 | |||
469 | namespace { | 482 | namespace { |
470 | class SetTitleDialog: public TextDialog, public FbTk::Observer { | 483 | class SetTitleDialog: public TextDialog, public FbTk::Observer { |
471 | public: | 484 | public: |