diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-05 12:00:48 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-05 12:00:48 (GMT) |
commit | 22aa93c56de131b80dfb161615650c4fb6cf6832 (patch) | |
tree | d68fe96088759ea952ff8f4b7214411be9541f46 /src/CurrentWindowCmd.cc | |
parent | 24bea22035e79c17fa6b6fdcd60f88e4eac467d8 (diff) | |
download | fluxbox_lack-22aa93c56de131b80dfb161615650c4fb6cf6832.zip fluxbox_lack-22aa93c56de131b80dfb161615650c4fb6cf6832.tar.bz2 |
fix the Focus key command
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r-- | src/CurrentWindowCmd.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc index 42ee69c..9253058 100644 --- a/src/CurrentWindowCmd.cc +++ b/src/CurrentWindowCmd.cc | |||
@@ -56,8 +56,6 @@ FbTk::Command<void> *createCurrentWindowCmd(const std::string &command, | |||
56 | return new CurrentWindowCmd(&FluxboxWindow::lower); | 56 | return new CurrentWindowCmd(&FluxboxWindow::lower); |
57 | else if (command == "lowerlayer") | 57 | else if (command == "lowerlayer") |
58 | return new CurrentWindowCmd(&FluxboxWindow::lowerLayer); | 58 | return new CurrentWindowCmd(&FluxboxWindow::lowerLayer); |
59 | else if (command == "activate" || command == "focus") | ||
60 | return new CurrentWindowCmd((void (FluxboxWindow::*)())&FluxboxWindow::focus); | ||
61 | else if (command == "close") | 59 | else if (command == "close") |
62 | return new CurrentWindowCmd(&FluxboxWindow::close); | 60 | return new CurrentWindowCmd(&FluxboxWindow::close); |
63 | else if (command == "killwindow" || command == "kill") | 61 | else if (command == "killwindow" || command == "kill") |
@@ -98,8 +96,6 @@ REGISTER_COMMAND_PARSER(raise, createCurrentWindowCmd, void); | |||
98 | REGISTER_COMMAND_PARSER(raiselayer, createCurrentWindowCmd, void); | 96 | REGISTER_COMMAND_PARSER(raiselayer, createCurrentWindowCmd, void); |
99 | REGISTER_COMMAND_PARSER(lower, createCurrentWindowCmd, void); | 97 | REGISTER_COMMAND_PARSER(lower, createCurrentWindowCmd, void); |
100 | REGISTER_COMMAND_PARSER(lowerlayer, createCurrentWindowCmd, void); | 98 | REGISTER_COMMAND_PARSER(lowerlayer, createCurrentWindowCmd, void); |
101 | REGISTER_COMMAND_PARSER(activate, createCurrentWindowCmd, void); | ||
102 | REGISTER_COMMAND_PARSER(focus, createCurrentWindowCmd, void); | ||
103 | REGISTER_COMMAND_PARSER(close, createCurrentWindowCmd, void); | 99 | REGISTER_COMMAND_PARSER(close, createCurrentWindowCmd, void); |
104 | REGISTER_COMMAND_PARSER(killwindow, createCurrentWindowCmd, void); | 100 | REGISTER_COMMAND_PARSER(killwindow, createCurrentWindowCmd, void); |
105 | REGISTER_COMMAND_PARSER(kill, createCurrentWindowCmd, void); | 101 | REGISTER_COMMAND_PARSER(kill, createCurrentWindowCmd, void); |
@@ -252,6 +248,18 @@ void GoToTabCmd::real_execute() { | |||
252 | (*it)->focus(); | 248 | (*it)->focus(); |
253 | } | 249 | } |
254 | 250 | ||
251 | REGISTER_COMMAND_WITH_ARGS(activate, FocusCmd, void); | ||
252 | REGISTER_COMMAND_WITH_ARGS(focus, FocusCmd, void); | ||
253 | |||
254 | void FocusCmd::real_execute() { | ||
255 | Focusable *win = 0; | ||
256 | if (!m_pat.error()) | ||
257 | win = fbwindow().screen().focusControl().focusedOrderWinList().find(m_pat); | ||
258 | if (!win) | ||
259 | win = &fbwindow(); | ||
260 | win->focus(); | ||
261 | } | ||
262 | |||
255 | REGISTER_COMMAND(startmoving, StartMovingCmd, void); | 263 | REGISTER_COMMAND(startmoving, StartMovingCmd, void); |
256 | 264 | ||
257 | void StartMovingCmd::real_execute() { | 265 | void StartMovingCmd::real_execute() { |