diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2010-08-20 17:01:25 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2010-08-20 17:01:25 (GMT) |
commit | bc2b21547b290f599ca83297e3131c6c0c87759f (patch) | |
tree | d1ae4947f3c2818aef33d2cd0ef5d639b558dd72 /src/CurrentWindowCmd.cc | |
parent | b4e65724efbfbefdf4f5a12be19225b2d8a8dda6 (diff) | |
download | fluxbox-bc2b21547b290f599ca83297e3131c6c0c87759f.zip fluxbox-bc2b21547b290f599ca83297e3131c6c0c87759f.tar.bz2 |
implemented 'ActivateTab' action to (re)allow activation of tabs via mouse
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r-- | src/CurrentWindowCmd.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc index 713c32a..4d25d54 100644 --- a/src/CurrentWindowCmd.cc +++ b/src/CurrentWindowCmd.cc | |||
@@ -223,6 +223,27 @@ FbTk::Command<void> *parseFocusCmd(const string &command, const string &args, | |||
223 | REGISTER_COMMAND_PARSER(activate, parseFocusCmd, void); | 223 | REGISTER_COMMAND_PARSER(activate, parseFocusCmd, void); |
224 | REGISTER_COMMAND_PARSER(focus, parseFocusCmd, void); | 224 | REGISTER_COMMAND_PARSER(focus, parseFocusCmd, void); |
225 | 225 | ||
226 | |||
227 | class ActivateTabCmd: public WindowHelperCmd { | ||
228 | public: | ||
229 | ActivateTabCmd() { } | ||
230 | protected: | ||
231 | void real_execute(); | ||
232 | }; | ||
233 | |||
234 | |||
235 | void ActivateTabCmd::real_execute() { | ||
236 | |||
237 | WinClient* winclient = fbwindow().winClientOfLabelButtonWindow( | ||
238 | Fluxbox::instance()->lastEvent().xany.window); | ||
239 | |||
240 | if (winclient && winclient != &fbwindow().winClient()) { | ||
241 | fbwindow().setCurrentClient(*winclient, true); | ||
242 | } | ||
243 | } | ||
244 | |||
245 | REGISTER_COMMAND(activatetab, ActivateTabCmd, void); | ||
246 | |||
226 | } // end anonymous namespace | 247 | } // end anonymous namespace |
227 | 248 | ||
228 | void SetHeadCmd::real_execute() { | 249 | void SetHeadCmd::real_execute() { |