all repos — fluxbox @ 6ab2a90d72b5350b5e6b410da611fe3ad2a771a9

custom fork of the fluxbox windowmanager

initMenus after we add screen to our list. Added find screen by number.
fluxgen fluxgen
commit

6ab2a90d72b5350b5e6b410da611fe3ad2a771a9

parent

f278773f92f8feefcbc1b1f1da4f255e1f01dcdd

2 files changed, 25 insertions(+), 6 deletions(-)

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

@@ -22,7 +22,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: fluxbox.cc,v 1.241 2004/04/26 09:25:42 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.242 2004/05/02 20:48:16 fluxgen Exp $ #include "fluxbox.hh"

@@ -535,7 +535,11 @@ if (! screen->isScreenManaged()) {

delete screen; continue; } - // now it's safe to create windows + // add to our list + m_screen_list.push_back(screen); + + // now we can create menus (which needs this screen to be in screen_list) + screen->initMenus(); screen->initWindows(); #ifdef HAVE_GETPID

@@ -559,10 +563,11 @@ #endif // X_RRScreenChangeSelectInput

#endif // HAVE_RANDR - m_screen_list.push_back(screen); + #ifdef USE_TOOLBAR m_toolbars.push_back(new Toolbar(*screen, - *screen->layerManager().getLayer(Fluxbox::instance()->getNormalLayer()))); + *screen->layerManager(). + getLayer(Fluxbox::instance()->getNormalLayer()))); #endif // USE_TOOLBAR // must do this after systray is created screen->setupKdeDockapps();

@@ -1840,6 +1845,19 @@

} +BScreen *Fluxbox::findScreen(int id) { + ScreenList::iterator it = m_screen_list.begin(); + ScreenList::iterator it_end = m_screen_list.end(); + for (; it != it_end; ++it) { + if ((*it)->screenNumber() == id) + break; + } + + if (it == m_screen_list.end()) + return 0; + + return *it; +} bool Fluxbox::menuTimestampsChanged() const { std::list<MenuTimestamp *>::const_iterator it = m_menu_timestamps.begin();
M src/fluxbox.hhsrc/fluxbox.hh

@@ -22,7 +22,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: fluxbox.hh,v 1.87 2004/04/22 21:07:57 fluxgen Exp $ +// $Id: fluxbox.hh,v 1.88 2004/05/02 20:48:16 fluxgen Exp $ #ifndef FLUXBOX_HH #define FLUXBOX_HH

@@ -199,7 +199,8 @@ void timed_reconfigure();

bool isStartup() const { return m_starting; } - + /// get screen from number + BScreen *findScreen(int num); typedef std::vector<Fluxbox::Titlebar> TitlebarList; /// @return whether the timestamps on the menu changed