fix background: random so that background.pixmap allows a directory name
markt markt
2 files changed,
8 insertions(+),
2 deletions(-)
M
src/RootTheme.cc
→
src/RootTheme.cc
@@ -180,8 +180,6 @@ if (strstr(m_background->options().c_str(), "tiled") != 0)
options += "-t "; if (strstr(m_background->options().c_str(), "centered") != 0) options += "-c "; - if (strstr(m_background->options().c_str(), "random") != 0) - options += "-r "; if (strstr(m_background->options().c_str(), "aspect") != 0) options += "-a ";@@ -192,6 +190,11 @@ // call command with options
FbCommands::ExecuteCmd exec(commandargs, screenNum()); exec.execute(); + } else if (FbTk::FileUtil::isDirectory(filename.c_str()) && + strstr(m_background->options().c_str(), "random") != 0) { + std::string commandargs = "fbsetbg -r " + filename; + FbCommands::ExecuteCmd exec(commandargs, screenNum()); + exec.execute(); } else { // render normal texture with fbsetroot