added :Focus key command

This commit is contained in:
markt 2007-11-16 23:33:34 +00:00
parent ea7801d143
commit 2e96a07cf7
2 changed files with 10 additions and 3 deletions

View file

@ -1,6 +1,9 @@
(Format: Year/Month/Day)
Changes for 1.0.1:
*07/11/16:
* Added new key command :Focus [<pattern>] that focuses a window (e.g., using
OnWindow or specified using a window pattern) (Mark, thanks Tomas Janousek)
FbCommandFactory.cc
* Using ToggleDecor from Deco=TAB should hide tabs (thanks Tomas Janousek)
Window.cc
*07/11/12:

View file

@ -65,9 +65,10 @@ static int getint(const char *str, int defaultvalue) {
FbCommandFactory::FbCommandFactory() {
// setup commands that we can handle
const char* commands[] = {
"addworkspace",
"activate",
"addworkspace",
"arrangewindows",
"attach",
"attach",
"bindkey",
"clientmenu",
"close",
@ -81,6 +82,7 @@ FbCommandFactory::FbCommandFactory() {
"execcommand",
"execute",
"exit",
"focus",
"focusup",
"focusdown",
"focusleft",
@ -124,7 +126,7 @@ FbCommandFactory::FbCommandFactory() {
"reconfig",
"reconfigure",
"reloadstyle",
"removelastworkspace",
"removelastworkspace",
"resizeto",
"resize",
"resizehorizontal",
@ -419,6 +421,8 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
return new WindowListCmd(FbTk::RefCount<WindowHelperCmd>(new CurrentWindowCmd(&FluxboxWindow::lower)), arguments);
else if (command == "lowerlayer")
return new WindowListCmd(FbTk::RefCount<WindowHelperCmd>(new CurrentWindowCmd(&FluxboxWindow::lowerLayer)), arguments);
else if (command == "activate" || command == "focus")
return new WindowListCmd(FbTk::RefCount<WindowHelperCmd>(new CurrentWindowCmd((void (FluxboxWindow::*)())&FluxboxWindow::focus)), arguments);
else if (command == "close")
return new WindowListCmd(FbTk::RefCount<WindowHelperCmd>(new CurrentWindowCmd(&FluxboxWindow::close)), arguments);
else if (command == "closeallwindows")