fix :Focus <pattern> when all windows are minimized
This commit is contained in:
parent
ccba298cb5
commit
18ae02875f
2 changed files with 13 additions and 22 deletions
|
@ -189,6 +189,19 @@ REGISTER_COMMAND_PARSER(taketoprevworkspace, parseIntCmd, void);
|
|||
REGISTER_COMMAND_PARSER(sendtoworkspace, parseIntCmd, void);
|
||||
REGISTER_COMMAND_PARSER(taketoworkspace, parseIntCmd, void);
|
||||
|
||||
FbTk::Command<void> *parseFocusCmd(const string &command, const string &args,
|
||||
bool trusted) {
|
||||
ClientPattern pat(args.c_str());
|
||||
if (!pat.error())
|
||||
return FbTk::CommandParser<void>::instance().parse("GoToWindow 1 " +
|
||||
args);
|
||||
return new CurrentWindowCmd((CurrentWindowCmd::Action)
|
||||
&FluxboxWindow::focus);
|
||||
}
|
||||
|
||||
REGISTER_COMMAND_PARSER(activate, parseFocusCmd, void);
|
||||
REGISTER_COMMAND_PARSER(focus, parseFocusCmd, void);
|
||||
|
||||
}; // end anonymous namespace
|
||||
|
||||
void SetHeadCmd::real_execute() {
|
||||
|
@ -250,18 +263,6 @@ void GoToTabCmd::real_execute() {
|
|||
(*it)->focus();
|
||||
}
|
||||
|
||||
REGISTER_COMMAND_WITH_ARGS(activate, FocusCmd, void);
|
||||
REGISTER_COMMAND_WITH_ARGS(focus, FocusCmd, void);
|
||||
|
||||
void FocusCmd::real_execute() {
|
||||
Focusable *win = 0;
|
||||
if (!m_pat.error())
|
||||
win = fbwindow().screen().focusControl().focusedOrderWinList().find(m_pat);
|
||||
if (!win)
|
||||
win = &fbwindow();
|
||||
win->focus();
|
||||
}
|
||||
|
||||
REGISTER_COMMAND(startmoving, StartMovingCmd, void);
|
||||
|
||||
void StartMovingCmd::real_execute() {
|
||||
|
|
|
@ -137,16 +137,6 @@ private:
|
|||
const int m_tab_num;
|
||||
};
|
||||
|
||||
// focus the window
|
||||
class FocusCmd: public WindowHelperCmd {
|
||||
public:
|
||||
explicit FocusCmd(const std::string &pat): m_pat(pat.c_str()) { }
|
||||
protected:
|
||||
void real_execute();
|
||||
private:
|
||||
const ClientPattern m_pat;
|
||||
};
|
||||
|
||||
// begin moving with mouse
|
||||
class StartMovingCmd: public WindowHelperCmd {
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue