all repos — fluxbox @ 18ae02875fbe67b375bbc5a8d3ac84771d0767c1

custom fork of the fluxbox windowmanager

fix :Focus <pattern> when all windows are minimized
Mark Tiefenbruck mark@fluxbox.org
commit

18ae02875fbe67b375bbc5a8d3ac84771d0767c1

parent

ccba298cb59e2d2dbd2235188e0695fff62c4799

2 files changed, 13 insertions(+), 22 deletions(-)

jump to
M src/CurrentWindowCmd.ccsrc/CurrentWindowCmd.cc

@@ -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() {

@@ -248,18 +261,6 @@

while (--num > 0) ++it; (*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);
M src/CurrentWindowCmd.hhsrc/CurrentWindowCmd.hh

@@ -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: