aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-05-02 20:48:16 (GMT)
committerfluxgen <fluxgen>2004-05-02 20:48:16 (GMT)
commit6ab2a90d72b5350b5e6b410da611fe3ad2a771a9 (patch)
tree9afc18e95de36947fd6d3bacb4c478968fae7f18 /src
parentf278773f92f8feefcbc1b1f1da4f255e1f01dcdd (diff)
downloadfluxbox-6ab2a90d72b5350b5e6b410da611fe3ad2a771a9.zip
fluxbox-6ab2a90d72b5350b5e6b410da611fe3ad2a771a9.tar.bz2
initMenus after we add screen to our list. Added find screen by number.
Diffstat (limited to 'src')
-rw-r--r--src/fluxbox.cc26
-rw-r--r--src/fluxbox.hh5
2 files changed, 25 insertions, 6 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 11ecb16..9f0f24e 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: fluxbox.cc,v 1.241 2004/04/26 09:25:42 fluxgen Exp $ 25// $Id: fluxbox.cc,v 1.242 2004/05/02 20:48:16 fluxgen Exp $
26 26
27#include "fluxbox.hh" 27#include "fluxbox.hh"
28 28
@@ -535,7 +535,11 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
535 delete screen; 535 delete screen;
536 continue; 536 continue;
537 } 537 }
538 // now it's safe to create windows 538 // add to our list
539 m_screen_list.push_back(screen);
540
541 // now we can create menus (which needs this screen to be in screen_list)
542 screen->initMenus();
539 screen->initWindows(); 543 screen->initWindows();
540 544
541#ifdef HAVE_GETPID 545#ifdef HAVE_GETPID
@@ -559,10 +563,11 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
559 563
560#endif // HAVE_RANDR 564#endif // HAVE_RANDR
561 565
562 m_screen_list.push_back(screen); 566
563#ifdef USE_TOOLBAR 567#ifdef USE_TOOLBAR
564 m_toolbars.push_back(new Toolbar(*screen, 568 m_toolbars.push_back(new Toolbar(*screen,
565 *screen->layerManager().getLayer(Fluxbox::instance()->getNormalLayer()))); 569 *screen->layerManager().
570 getLayer(Fluxbox::instance()->getNormalLayer())));
566#endif // USE_TOOLBAR 571#endif // USE_TOOLBAR
567 // must do this after systray is created 572 // must do this after systray is created
568 screen->setupKdeDockapps(); 573 screen->setupKdeDockapps();
@@ -1840,6 +1845,19 @@ void Fluxbox::real_reconfigure() {
1840 1845
1841} 1846}
1842 1847
1848BScreen *Fluxbox::findScreen(int id) {
1849 ScreenList::iterator it = m_screen_list.begin();
1850 ScreenList::iterator it_end = m_screen_list.end();
1851 for (; it != it_end; ++it) {
1852 if ((*it)->screenNumber() == id)
1853 break;
1854 }
1855
1856 if (it == m_screen_list.end())
1857 return 0;
1858
1859 return *it;
1860}
1843 1861
1844bool Fluxbox::menuTimestampsChanged() const { 1862bool Fluxbox::menuTimestampsChanged() const {
1845 std::list<MenuTimestamp *>::const_iterator it = m_menu_timestamps.begin(); 1863 std::list<MenuTimestamp *>::const_iterator it = m_menu_timestamps.begin();
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index ea10e5d..9651e8c 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: fluxbox.hh,v 1.87 2004/04/22 21:07:57 fluxgen Exp $ 25// $Id: fluxbox.hh,v 1.88 2004/05/02 20:48:16 fluxgen Exp $
26 26
27#ifndef FLUXBOX_HH 27#ifndef FLUXBOX_HH
28#define FLUXBOX_HH 28#define FLUXBOX_HH
@@ -199,7 +199,8 @@ public:
199 199
200 bool isStartup() const { return m_starting; } 200 bool isStartup() const { return m_starting; }
201 201
202 202 /// get screen from number
203 BScreen *findScreen(int num);
203 204
204 typedef std::vector<Fluxbox::Titlebar> TitlebarList; 205 typedef std::vector<Fluxbox::Titlebar> TitlebarList;
205 /// @return whether the timestamps on the menu changed 206 /// @return whether the timestamps on the menu changed