aboutsummaryrefslogtreecommitdiff
path: root/src/CurrentWindowCmd.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-08-18 22:20:16 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-08-18 22:20:16 (GMT)
commit18ae02875fbe67b375bbc5a8d3ac84771d0767c1 (patch)
treee5de3f22cce6b2376ddb712577b7d616d79ec045 /src/CurrentWindowCmd.cc
parentccba298cb59e2d2dbd2235188e0695fff62c4799 (diff)
downloadfluxbox-18ae02875fbe67b375bbc5a8d3ac84771d0767c1.zip
fluxbox-18ae02875fbe67b375bbc5a8d3ac84771d0767c1.tar.bz2
fix :Focus <pattern> when all windows are minimized
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r--src/CurrentWindowCmd.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc
index 28d7ecd..bfccbdc 100644
--- a/src/CurrentWindowCmd.cc
+++ b/src/CurrentWindowCmd.cc
@@ -189,6 +189,19 @@ REGISTER_COMMAND_PARSER(taketoprevworkspace, parseIntCmd, void);
189REGISTER_COMMAND_PARSER(sendtoworkspace, parseIntCmd, void); 189REGISTER_COMMAND_PARSER(sendtoworkspace, parseIntCmd, void);
190REGISTER_COMMAND_PARSER(taketoworkspace, parseIntCmd, void); 190REGISTER_COMMAND_PARSER(taketoworkspace, parseIntCmd, void);
191 191
192FbTk::Command<void> *parseFocusCmd(const string &command, const string &args,
193 bool trusted) {
194 ClientPattern pat(args.c_str());
195 if (!pat.error())
196 return FbTk::CommandParser<void>::instance().parse("GoToWindow 1 " +
197 args);
198 return new CurrentWindowCmd((CurrentWindowCmd::Action)
199 &FluxboxWindow::focus);
200}
201
202REGISTER_COMMAND_PARSER(activate, parseFocusCmd, void);
203REGISTER_COMMAND_PARSER(focus, parseFocusCmd, void);
204
192}; // end anonymous namespace 205}; // end anonymous namespace
193 206
194void SetHeadCmd::real_execute() { 207void SetHeadCmd::real_execute() {
@@ -250,18 +263,6 @@ void GoToTabCmd::real_execute() {
250 (*it)->focus(); 263 (*it)->focus();
251} 264}
252 265
253REGISTER_COMMAND_WITH_ARGS(activate, FocusCmd, void);
254REGISTER_COMMAND_WITH_ARGS(focus, FocusCmd, void);
255
256void FocusCmd::real_execute() {
257 Focusable *win = 0;
258 if (!m_pat.error())
259 win = fbwindow().screen().focusControl().focusedOrderWinList().find(m_pat);
260 if (!win)
261 win = &fbwindow();
262 win->focus();
263}
264
265REGISTER_COMMAND(startmoving, StartMovingCmd, void); 266REGISTER_COMMAND(startmoving, StartMovingCmd, void);
266 267
267void StartMovingCmd::real_execute() { 268void StartMovingCmd::real_execute() {