add functions to toggle slit/toolbar hidden
Thomas Lübking thomas.luebking@gmail.com
3 files changed,
36 insertions(+),
0 deletions(-)
M
doc/asciidoc/fluxbox-keys.txt
→
doc/asciidoc/fluxbox-keys.txt
@@ -441,8 +441,14 @@
*ToggleSlitAbove*:: Toggles the slit between its regular and the AboveDock layer +*ToggleSlitHidden*:: + Toggles the slit's autohiding state (autohide doesn't have to be enabled) + *ToggleToolbarAbove*:: Toggles the toolbar between its regular and the AboveDock layer + +*ToggleToolbarHidden*:: + Toggles the toolbar's autohiding state (autohide doesn't have to be enabled) *Deiconify* 'mode' 'destination':: Deiconifies windows (or, restores from a minimized state).
M
src/WorkspaceCmd.cc
→
src/WorkspaceCmd.cc
@@ -634,11 +634,31 @@ }
#endif } +REGISTER_COMMAND(toggleslithidden, ToggleSlitHiddenCmd, void); +void ToggleSlitHiddenCmd::execute() { +#if USE_SLIT + if (BScreen *screen = Fluxbox::instance()->mouseScreen()) { + screen->slit()->toggleHidden(); + const_cast<FbTk::FbWindow&>(screen->slit()->window()).raise(); + } +#endif +} + REGISTER_COMMAND(toggletoolbarabove, ToggleToolbarAboveCmd, void); void ToggleToolbarAboveCmd::execute() { #if USE_TOOLBAR if (BScreen *screen = Fluxbox::instance()->mouseScreen()) { screen->toolbar()->toggleAboveDock(); + const_cast<FbTk::FbWindow&>(screen->toolbar()->window()).raise(); + } +#endif +} + +REGISTER_COMMAND(toggletoolbarvisible, ToggleToolbarHiddenCmd, void); +void ToggleToolbarHiddenCmd::execute() { +#if USE_TOOLBAR + if (BScreen *screen = Fluxbox::instance()->mouseScreen()) { + screen->toolbar()->toggleHidden(); const_cast<FbTk::FbWindow&>(screen->toolbar()->window()).raise(); } #endif
M
src/WorkspaceCmd.hh
→
src/WorkspaceCmd.hh
@@ -197,7 +197,17 @@ public:
void execute(); }; +class ToggleSlitHiddenCmd: public FbTk::Command<void> { +public: + void execute(); +}; + class ToggleToolbarAboveCmd: public FbTk::Command<void> { +public: + void execute(); +}; + +class ToggleToolbarHiddenCmd: public FbTk::Command<void> { public: void execute(); };