all repos — fluxbox @ 443e7081d44f27a254fbbb549013ef337f078b13

custom fork of the fluxbox windowmanager

fix the hiding of the menu when the menufile-timestamps changed
mathias mathias
commit

443e7081d44f27a254fbbb549013ef337f078b13

parent

7f3249f05c5f7098228c3a8533323dcecfdd254b

3 files changed, 26 insertions(+), 7 deletions(-)

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

@@ -58,6 +58,19 @@

namespace { void showMenu(const BScreen &screen, FbTk::Menu &menu) { + + // special case for root menu + if (&menu == &screen.getRootmenu()) { + Fluxbox* fb = Fluxbox::instance(); + if(fb->menuTimestampsChanged()) { + // we dont show the menu here because fluxbox + // will bring up the rootmenu after the timed + // reread of the menu + fb->rereadMenu(true); + return; + } + } + Window root_ret; // not used Window window_ret; // not used

@@ -84,10 +97,7 @@ menu.setScreen(screen.getHeadX(head),

screen.getHeadY(head), screen.getHeadWidth(head), screen.getHeadHeight(head)); - // special case for root menu - if (&menu == &screen.getRootmenu()) - Fluxbox::instance()->checkMenu(); - + menu.show(); menu.grabInputFocus(); }
M src/fluxbox.ccsrc/fluxbox.cc

@@ -1624,7 +1624,6 @@

//reconfigure keys m_key->reconfigure(StringUtil::expandFilename(*m_rc_keyfile).c_str()); - } BScreen *Fluxbox::findScreen(int id) {

@@ -1676,8 +1675,9 @@ #endif // USE_TOOLBAR

} -void Fluxbox::rereadMenu() { +void Fluxbox::rereadMenu(bool show_after_reread) { m_reread_menu_wait = true; + m_show_menu_after_reread = show_after_reread; m_reconfig_timer.start(); }

@@ -1690,6 +1690,14 @@ delete *it;

m_menu_timestamps.erase(m_menu_timestamps.begin(), m_menu_timestamps.end()); for_each(m_screen_list.begin(), m_screen_list.end(), mem_fun(&BScreen::rereadMenu)); + + if(m_show_menu_after_reread) { + + FbCommands::ShowRootMenuCmd showcmd; + showcmd.execute(); + + m_show_menu_after_reread = false; + } } void Fluxbox::saveMenuFilename(const char *filename) {
M src/fluxbox.hhsrc/fluxbox.hh

@@ -189,7 +189,7 @@ void removeWindowSearchGroup(Window win);

void removeGroupSearch(Window win); void restart(const char *command = 0); void reconfigure(); - void rereadMenu(); + void rereadMenu(bool show_after_reread = false); /// reloads the menus if the timestamps changed void checkMenu();

@@ -325,6 +325,7 @@

bool m_starting; bool m_restarting; bool m_shutdown; + bool m_show_menu_after_reread; int m_server_grabs; int m_randr_event_type; ///< the type number of randr event int m_shape_eventbase; ///< event base for shape events