From 0409604f3ad30016217a66c251dfab1f4a7ecb97 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 1 Jul 2003 20:24:19 +0000 Subject: added ShowRootMenuCmd --- src/FbCommands.cc | 14 +++++++++++++- src/FbCommands.hh | 7 ++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 6dee267..1c84154 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc @@ -19,12 +19,13 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbCommands.cc,v 1.10 2003/06/30 15:00:32 fluxgen Exp $ +// $Id: FbCommands.cc,v 1.11 2003/07/01 20:24:19 fluxgen Exp $ #include "FbCommands.hh" #include "fluxbox.hh" #include "FbTk/Theme.hh" #include "Screen.hh" +#include "Menu.hh" #include #include @@ -105,4 +106,15 @@ void SetStyleCmd::execute() { } +void ShowRootMenuCmd::execute() { + BScreen *screen = Fluxbox::instance()->mouseScreen(); + if (screen == 0) + return; + + if (screen->getRootmenu()) { + screen->getRootmenu()->show(); + screen->getRootmenu()->grabInputFocus(); + } +} + }; // end namespace FbCommands diff --git a/src/FbCommands.hh b/src/FbCommands.hh index df83ec8..04fb9e8 100644 --- a/src/FbCommands.hh +++ b/src/FbCommands.hh @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbCommands.hh,v 1.7 2003/06/30 14:59:38 fluxgen Exp $ +// $Id: FbCommands.hh,v 1.8 2003/07/01 20:24:19 fluxgen Exp $ // \file contains basic commands to restart, reconfigure, execute command and exit fluxbox @@ -78,6 +78,11 @@ private: std::string m_filename; }; +class ShowRootMenuCmd: public FbTk::Command { +public: + void execute(); +}; + }; // end namespace FbCommands #endif // FBCOMMANDS_HH -- cgit v0.11.2