all repos — fluxbox @ b766418c4f4867b802eb34967433d0738449522c

custom fork of the fluxbox windowmanager

init m_max_screens later
fluxgen fluxgen
commit

b766418c4f4867b802eb34967433d0738449522c

parent

0132b31f4e1036902f4c880d30ce573dddd3f1b9

2 files changed, 9 insertions(+), 4 deletions(-)

jump to
M src/FbTk/Theme.ccsrc/FbTk/Theme.cc

@@ -19,7 +19,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: Theme.cc,v 1.23 2003/12/29 11:04:09 fluxgen Exp $ +// $Id: Theme.cc,v 1.24 2004/01/02 22:55:35 fluxgen Exp $ #include "Theme.hh"

@@ -51,13 +51,18 @@ return tm;

} ThemeManager::ThemeManager(): - m_max_screens(ScreenCount(FbTk::App::instance()->display())), + // max_screens: we initialize this later so we can set m_verbose + // without having a display connection + m_max_screens(-1), m_verbose(false), m_themelocation("") { } bool ThemeManager::registerTheme(Theme &tm) { + if (m_max_screens < 0) + m_max_screens = ScreenCount(FbTk::App::instance()->display()); + // valid screen num? if (m_max_screens < tm.screenNum() || tm.screenNum() < 0) return false;
M src/FbTk/Theme.hhsrc/FbTk/Theme.hh

@@ -19,7 +19,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: Theme.hh,v 1.14 2003/12/29 11:04:09 fluxgen Exp $ +// $Id: Theme.hh,v 1.15 2004/01/02 22:55:15 fluxgen Exp $ /** @file holds ThemeItem<T>, Theme and ThemeManager which is the base for any theme

@@ -147,7 +147,7 @@ bool unregisterTheme(FbTk::Theme &tm);

/// map each theme manager to a screen typedef std::list<FbTk::Theme *> ThemeList; ThemeList m_themelist; - const int m_max_screens; + int m_max_screens; XrmDatabaseHelper m_database; bool m_verbose;