From 9477af82a5835b7336fec8879967abb67f3bd848 Mon Sep 17 00:00:00 2001 From: markt Date: Sat, 3 Mar 2007 23:27:16 +0000 Subject: removed session.numLayers resource, as it was useless and caused segfaults --- doc/asciidoc/fluxbox.txt | 3 --- src/Layer.hh | 3 ++- src/Window.cc | 4 ++-- src/fluxbox.cc | 3 +-- src/fluxbox.hh | 7 +------ 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/doc/asciidoc/fluxbox.txt b/doc/asciidoc/fluxbox.txt index 437ebab..5ee9745 100644 --- a/doc/asciidoc/fluxbox.txt +++ b/doc/asciidoc/fluxbox.txt @@ -1020,9 +1020,6 @@ session.ignoreBorder: This configures the ability to move windows by dragging the border. Default: False -session.numLayers: - This controls how many layers fluxbox should have. Default: 13 - session.tabPadding: This specifies the spacing between tabs. Default: 0 diff --git a/src/Layer.hh b/src/Layer.hh index e0c0134..2b15539 100644 --- a/src/Layer.hh +++ b/src/Layer.hh @@ -37,7 +37,8 @@ public: TOP = 6, NORMAL = 8, BOTTOM = 10, - DESKTOP = 12 + DESKTOP = 12, + NUM_LAYERS = 13 }; explicit Layer(int i) : m_num(i) {}; diff --git a/src/Window.cc b/src/Window.cc index 4e02bfe..3d0db79 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1922,8 +1922,8 @@ void FluxboxWindow::moveToLayer(int layernum, bool force) { // don't let it set its layer into menu area if (layernum <= ::Layer::MENU) layernum = ::Layer::MENU + 1; - else if (layernum >= Fluxbox::instance()->getNumberOfLayers()) - layernum = Fluxbox::instance()->getNumberOfLayers()-1; + else if (layernum >= ::Layer::NUM_LAYERS) + layernum = ::Layer::NUM_LAYERS - 1; if (!m_initialized) m_layernum = layernum; diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 89bd0d5..c71e2f5 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -211,7 +211,6 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile m_rc_pseudotrans(m_resourcemanager, false, "session.forcePseudoTransparency", "Session.forcePseudoTransparency"), m_rc_colors_per_channel(m_resourcemanager, 4, "session.colorsPerChannel", "Session.ColorsPerChannel"), - m_rc_numlayers(m_resourcemanager, 13, "session.numLayers", "Session.NumLayers"), m_rc_double_click_interval(m_resourcemanager, 250, "session.doubleClickInterval", "Session.DoubleClickInterval"), m_rc_tabs_padding(m_resourcemanager, 0, "session.tabPadding", "Session.TabPadding"), m_rc_stylefile(m_resourcemanager, DEFAULTSTYLE, "session.styleFile", "Session.StyleFile"), @@ -378,7 +377,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile sprintf(altscrname, "session.Screen%d", screens[s]); BScreen *screen = new BScreen(m_screen_rm.lock(), scrname, altscrname, - screens[s], getNumberOfLayers()); + screens[s], ::Layer::NUM_LAYERS); // already handled if (! screen->isScreenManaged()) { diff --git a/src/fluxbox.hh b/src/fluxbox.hh index 3f4a00a..5613caa 100644 --- a/src/fluxbox.hh +++ b/src/fluxbox.hh @@ -126,13 +126,8 @@ public: const std::string &getSlitlistFilename() const { return *m_rc_slitlistfile; } const std::string &getAppsFilename() const { return *m_rc_appsfile; } int colorsPerChannel() const { return *m_rc_colors_per_channel; } - int getNumberOfLayers() const { return *m_rc_numlayers; } int getTabsPadding() const { return *m_rc_tabs_padding; } - // class to store layer numbers (special Resource type) - // we have a special resource type because we need to be able to name certain layers - // a Resource wouldn't allow this - time_t getAutoRaiseDelay() const { return *m_rc_auto_raise_delay; } @@ -246,7 +241,7 @@ private: FbTk::Resource m_rc_ignoreborder; FbTk::Resource m_rc_pseudotrans; - FbTk::Resource m_rc_colors_per_channel, m_rc_numlayers, + FbTk::Resource m_rc_colors_per_channel, m_rc_double_click_interval, m_rc_tabs_padding; FbTk::Resource m_rc_stylefile, -- cgit v0.11.2