all repos — fluxbox @ 43fc6483b4bbe72bb31142b079269e219ee675d6

custom fork of the fluxbox windowmanager

moved MenuContext class
fluxgen fluxgen
commit

43fc6483b4bbe72bb31142b079269e219ee675d6

parent

8634b9b3ef271adc12b9d989174aaa51b394fc08

1 files changed, 14 insertions(+), 13 deletions(-)

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

@@ -143,6 +143,19 @@ Parser::Item m_key, m_label, m_cmd, m_icon;

FbTk::Menu *m_menu; }; +class MenuContext: public LayerObject { +public: + void moveToLayer(int layer_number) { + if (WindowCmd<void>::window() == 0) + return; + WindowCmd<void>::window()->moveToLayer(layer_number); + } + int layerNumber() const { + if (WindowCmd<void>::window() == 0) + return -1; + return WindowCmd<void>::window()->layerItem().getLayerNum(); + } +}; static void translateMenuItem(Parser &parse, ParseItem &item);

@@ -532,19 +545,7 @@ BScreen *screen = Fluxbox::instance()->findScreen(menu.screenNumber());

if (screen == 0) return false; - class MenuContext: public LayerObject { - public: - void moveToLayer(int layer_number) { - if (WindowCmd<void>::window() == 0) - return; - WindowCmd<void>::window()->moveToLayer(layer_number); - } - int layerNumber() const { - if (WindowCmd<void>::window() == 0) - return -1; - return WindowCmd<void>::window()->layerItem().getLayerNum(); - } - } static context; + static MenuContext context; FbTk::Menu *submenu = new LayerMenu(screen->menuTheme(), screen->imageControl(),