all repos — fluxbox @ 0409604f3ad30016217a66c251dfab1f4a7ecb97

custom fork of the fluxbox windowmanager

added ShowRootMenuCmd
fluxgen fluxgen
commit

0409604f3ad30016217a66c251dfab1f4a7ecb97

parent

e6e43b00526364a7307064e7ceaf409aa0a90bd6

2 files changed, 19 insertions(+), 2 deletions(-)

jump to
M src/FbCommands.ccsrc/FbCommands.cc

@@ -19,12 +19,13 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 <sys/types.h> #include <unistd.h>

@@ -103,6 +104,17 @@ Fluxbox::instance()->saveStyleFilename(m_filename.c_str());

Fluxbox::instance()->save_rc(); FbTk::ThemeManager::instance().load(m_filename.c_str()); +} + +void ShowRootMenuCmd::execute() { + BScreen *screen = Fluxbox::instance()->mouseScreen(); + if (screen == 0) + return; + + if (screen->getRootmenu()) { + screen->getRootmenu()->show(); + screen->getRootmenu()->grabInputFocus(); + } } }; // end namespace FbCommands
M src/FbCommands.hhsrc/FbCommands.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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

@@ -76,6 +76,11 @@ explicit SetStyleCmd(const std::string &filename);

void execute(); private: std::string m_filename; +}; + +class ShowRootMenuCmd: public FbTk::Command { +public: + void execute(); }; }; // end namespace FbCommands