summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkt <markt>2007-03-03 23:27:16 (GMT)
committermarkt <markt>2007-03-03 23:27:16 (GMT)
commit9477af82a5835b7336fec8879967abb67f3bd848 (patch)
tree1a6d8df615791146b98434d254062a155a8a515f
parentd03f39f83650d401b400a2fa3086104d0f4da7a2 (diff)
downloadfluxbox_lack-9477af82a5835b7336fec8879967abb67f3bd848.zip
fluxbox_lack-9477af82a5835b7336fec8879967abb67f3bd848.tar.bz2
removed session.numLayers resource, as it was useless and caused segfaults
-rw-r--r--doc/asciidoc/fluxbox.txt3
-rw-r--r--src/Layer.hh3
-rw-r--r--src/Window.cc4
-rw-r--r--src/fluxbox.cc3
-rw-r--r--src/fluxbox.hh7
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: <boolean>
1020 This configures the ability to move windows by dragging the border. 1020 This configures the ability to move windows by dragging the border.
1021 Default: False 1021 Default: False
1022 1022
1023session.numLayers: <integer>
1024 This controls how many layers fluxbox should have. Default: 13
1025
1026session.tabPadding: <integer> 1023session.tabPadding: <integer>
1027 This specifies the spacing between tabs. Default: 0 1024 This specifies the spacing between tabs. Default: 0
1028 1025
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:
37 TOP = 6, 37 TOP = 6,
38 NORMAL = 8, 38 NORMAL = 8,
39 BOTTOM = 10, 39 BOTTOM = 10,
40 DESKTOP = 12 40 DESKTOP = 12,
41 NUM_LAYERS = 13
41 }; 42 };
42 43
43 explicit Layer(int i) : m_num(i) {}; 44 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) {
1922 // don't let it set its layer into menu area 1922 // don't let it set its layer into menu area
1923 if (layernum <= ::Layer::MENU) 1923 if (layernum <= ::Layer::MENU)
1924 layernum = ::Layer::MENU + 1; 1924 layernum = ::Layer::MENU + 1;
1925 else if (layernum >= Fluxbox::instance()->getNumberOfLayers()) 1925 else if (layernum >= ::Layer::NUM_LAYERS)
1926 layernum = Fluxbox::instance()->getNumberOfLayers()-1; 1926 layernum = ::Layer::NUM_LAYERS - 1;
1927 1927
1928 if (!m_initialized) 1928 if (!m_initialized)
1929 m_layernum = layernum; 1929 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
211 m_rc_pseudotrans(m_resourcemanager, false, "session.forcePseudoTransparency", "Session.forcePseudoTransparency"), 211 m_rc_pseudotrans(m_resourcemanager, false, "session.forcePseudoTransparency", "Session.forcePseudoTransparency"),
212 m_rc_colors_per_channel(m_resourcemanager, 4, 212 m_rc_colors_per_channel(m_resourcemanager, 4,
213 "session.colorsPerChannel", "Session.ColorsPerChannel"), 213 "session.colorsPerChannel", "Session.ColorsPerChannel"),
214 m_rc_numlayers(m_resourcemanager, 13, "session.numLayers", "Session.NumLayers"),
215 m_rc_double_click_interval(m_resourcemanager, 250, "session.doubleClickInterval", "Session.DoubleClickInterval"), 214 m_rc_double_click_interval(m_resourcemanager, 250, "session.doubleClickInterval", "Session.DoubleClickInterval"),
216 m_rc_tabs_padding(m_resourcemanager, 0, "session.tabPadding", "Session.TabPadding"), 215 m_rc_tabs_padding(m_resourcemanager, 0, "session.tabPadding", "Session.TabPadding"),
217 m_rc_stylefile(m_resourcemanager, DEFAULTSTYLE, "session.styleFile", "Session.StyleFile"), 216 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
378 sprintf(altscrname, "session.Screen%d", screens[s]); 377 sprintf(altscrname, "session.Screen%d", screens[s]);
379 BScreen *screen = new BScreen(m_screen_rm.lock(), 378 BScreen *screen = new BScreen(m_screen_rm.lock(),
380 scrname, altscrname, 379 scrname, altscrname,
381 screens[s], getNumberOfLayers()); 380 screens[s], ::Layer::NUM_LAYERS);
382 381
383 // already handled 382 // already handled
384 if (! screen->isScreenManaged()) { 383 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:
126 const std::string &getSlitlistFilename() const { return *m_rc_slitlistfile; } 126 const std::string &getSlitlistFilename() const { return *m_rc_slitlistfile; }
127 const std::string &getAppsFilename() const { return *m_rc_appsfile; } 127 const std::string &getAppsFilename() const { return *m_rc_appsfile; }
128 int colorsPerChannel() const { return *m_rc_colors_per_channel; } 128 int colorsPerChannel() const { return *m_rc_colors_per_channel; }
129 int getNumberOfLayers() const { return *m_rc_numlayers; }
130 int getTabsPadding() const { return *m_rc_tabs_padding; } 129 int getTabsPadding() const { return *m_rc_tabs_padding; }
131 130
132 // class to store layer numbers (special Resource type)
133 // we have a special resource type because we need to be able to name certain layers
134 // a Resource<int> wouldn't allow this
135
136 131
137 time_t getAutoRaiseDelay() const { return *m_rc_auto_raise_delay; } 132 time_t getAutoRaiseDelay() const { return *m_rc_auto_raise_delay; }
138 133
@@ -246,7 +241,7 @@ private:
246 241
247 FbTk::Resource<bool> m_rc_ignoreborder; 242 FbTk::Resource<bool> m_rc_ignoreborder;
248 FbTk::Resource<bool> m_rc_pseudotrans; 243 FbTk::Resource<bool> m_rc_pseudotrans;
249 FbTk::Resource<int> m_rc_colors_per_channel, m_rc_numlayers, 244 FbTk::Resource<int> m_rc_colors_per_channel,
250 m_rc_double_click_interval, 245 m_rc_double_click_interval,
251 m_rc_tabs_padding; 246 m_rc_tabs_padding;
252 FbTk::Resource<std::string> m_rc_stylefile, 247 FbTk::Resource<std::string> m_rc_stylefile,