aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbCommands.cc18
-rw-r--r--src/fluxbox.cc12
-rw-r--r--src/fluxbox.hh3
3 files changed, 26 insertions, 7 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc
index 84ad456..fbe41bd 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -58,6 +58,19 @@ using namespace std;
58namespace { 58namespace {
59 59
60void showMenu(const BScreen &screen, FbTk::Menu &menu) { 60void showMenu(const BScreen &screen, FbTk::Menu &menu) {
61
62 // special case for root menu
63 if (&menu == &screen.getRootmenu()) {
64 Fluxbox* fb = Fluxbox::instance();
65 if(fb->menuTimestampsChanged()) {
66 // we dont show the menu here because fluxbox
67 // will bring up the rootmenu after the timed
68 // reread of the menu
69 fb->rereadMenu(true);
70 return;
71 }
72 }
73
61 Window root_ret; // not used 74 Window root_ret; // not used
62 Window window_ret; // not used 75 Window window_ret; // not used
63 76
@@ -84,10 +97,7 @@ void showMenu(const BScreen &screen, FbTk::Menu &menu) {
84 screen.getHeadY(head), 97 screen.getHeadY(head),
85 screen.getHeadWidth(head), 98 screen.getHeadWidth(head),
86 screen.getHeadHeight(head)); 99 screen.getHeadHeight(head));
87 // special case for root menu 100
88 if (&menu == &screen.getRootmenu())
89 Fluxbox::instance()->checkMenu();
90
91 menu.show(); 101 menu.show();
92 menu.grabInputFocus(); 102 menu.grabInputFocus();
93} 103}
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 57a7dd1..b5e7828 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -1624,7 +1624,6 @@ void Fluxbox::real_reconfigure() {
1624 //reconfigure keys 1624 //reconfigure keys
1625 m_key->reconfigure(StringUtil::expandFilename(*m_rc_keyfile).c_str()); 1625 m_key->reconfigure(StringUtil::expandFilename(*m_rc_keyfile).c_str());
1626 1626
1627
1628} 1627}
1629 1628
1630BScreen *Fluxbox::findScreen(int id) { 1629BScreen *Fluxbox::findScreen(int id) {
@@ -1676,8 +1675,9 @@ void Fluxbox::hideExtraMenus(BScreen &screen) {
1676 1675
1677} 1676}
1678 1677
1679void Fluxbox::rereadMenu() { 1678void Fluxbox::rereadMenu(bool show_after_reread) {
1680 m_reread_menu_wait = true; 1679 m_reread_menu_wait = true;
1680 m_show_menu_after_reread = show_after_reread;
1681 m_reconfig_timer.start(); 1681 m_reconfig_timer.start();
1682} 1682}
1683 1683
@@ -1690,6 +1690,14 @@ void Fluxbox::real_rereadMenu() {
1690 1690
1691 m_menu_timestamps.erase(m_menu_timestamps.begin(), m_menu_timestamps.end()); 1691 m_menu_timestamps.erase(m_menu_timestamps.begin(), m_menu_timestamps.end());
1692 for_each(m_screen_list.begin(), m_screen_list.end(), mem_fun(&BScreen::rereadMenu)); 1692 for_each(m_screen_list.begin(), m_screen_list.end(), mem_fun(&BScreen::rereadMenu));
1693
1694 if(m_show_menu_after_reread) {
1695
1696 FbCommands::ShowRootMenuCmd showcmd;
1697 showcmd.execute();
1698
1699 m_show_menu_after_reread = false;
1700 }
1693} 1701}
1694 1702
1695void Fluxbox::saveMenuFilename(const char *filename) { 1703void Fluxbox::saveMenuFilename(const char *filename) {
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index 6ed7902..e850994 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.hh
@@ -189,7 +189,7 @@ public:
189 void removeGroupSearch(Window win); 189 void removeGroupSearch(Window win);
190 void restart(const char *command = 0); 190 void restart(const char *command = 0);
191 void reconfigure(); 191 void reconfigure();
192 void rereadMenu(); 192 void rereadMenu(bool show_after_reread = false);
193 /// reloads the menus if the timestamps changed 193 /// reloads the menus if the timestamps changed
194 void checkMenu(); 194 void checkMenu();
195 195
@@ -325,6 +325,7 @@ private:
325 bool m_starting; 325 bool m_starting;
326 bool m_restarting; 326 bool m_restarting;
327 bool m_shutdown; 327 bool m_shutdown;
328 bool m_show_menu_after_reread;
328 int m_server_grabs; 329 int m_server_grabs;
329 int m_randr_event_type; ///< the type number of randr event 330 int m_randr_event_type; ///< the type number of randr event
330 int m_shape_eventbase; ///< event base for shape events 331 int m_shape_eventbase; ///< event base for shape events