diff options
Diffstat (limited to 'src/WorkspaceCmd.cc')
-rw-r--r-- | src/WorkspaceCmd.cc | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc index 6d18b73..c2e4948 100644 --- a/src/WorkspaceCmd.cc +++ b/src/WorkspaceCmd.cc | |||
@@ -39,6 +39,8 @@ | |||
39 | #include "FbTk/stringstream.hh" | 39 | #include "FbTk/stringstream.hh" |
40 | #include "FbTk/StringUtil.hh" | 40 | #include "FbTk/StringUtil.hh" |
41 | 41 | ||
42 | #include "Debug.hh" | ||
43 | |||
42 | #ifdef HAVE_CMATH | 44 | #ifdef HAVE_CMATH |
43 | #include <cmath> | 45 | #include <cmath> |
44 | #else | 46 | #else |
@@ -751,3 +753,38 @@ FbTk::Command<void> *RelabelButtonCmd::parse(const std::string &command, | |||
751 | 753 | ||
752 | REGISTER_COMMAND_PARSER(relabelbutton, RelabelButtonCmd::parse, void); | 754 | REGISTER_COMMAND_PARSER(relabelbutton, RelabelButtonCmd::parse, void); |
753 | 755 | ||
756 | void MarkWindowCmd::execute() { | ||
757 | BScreen *screen = Fluxbox::instance()->keyScreen(); | ||
758 | if (screen) { | ||
759 | |||
760 | FluxboxWindow* window = screen->focusControl().focusedFbWindow(); | ||
761 | if (window) { | ||
762 | ShortcutManager &shortcutManager = Fluxbox::instance()->shortcutManager(); | ||
763 | unsigned int key = shortcutManager.getLastPlaceHolderKey(); | ||
764 | shortcutManager.mapKeyToWindow(key, window); | ||
765 | fbdbg << "Map window[" << window << "] to key[" << key << "]" << std::endl; | ||
766 | } | ||
767 | } | ||
768 | } | ||
769 | |||
770 | REGISTER_COMMAND(markwindow, MarkWindowCmd, void); | ||
771 | |||
772 | void GotoMarkedWindowCmd::execute() { | ||
773 | |||
774 | ShortcutManager &shortcutManager = Fluxbox::instance()->shortcutManager(); | ||
775 | unsigned int key = shortcutManager.getLastPlaceHolderKey(); | ||
776 | |||
777 | FluxboxWindow *window = shortcutManager.getWindowForKey(key); | ||
778 | if (window) { | ||
779 | |||
780 | if (window->isIconic()) { | ||
781 | window->deiconify(false); | ||
782 | } | ||
783 | window->raiseAndFocus(); | ||
784 | |||
785 | fbdbg << "Raise and focus window[" << window | ||
786 | << "] mapped to key[" << key << "]" << std::endl; | ||
787 | } | ||
788 | } | ||
789 | |||
790 | REGISTER_COMMAND(gotomarkedwindow, GotoMarkedWindowCmd, void); | ||