| 110 | | |
|---|
| 111 | | program_log("using xinerama"); |
|---|
| 112 | | |
|---|
| 113 | | bool foundfull = false; |
|---|
| 114 | | for (i=displist.begin(); i!=displist.end(); i++) |
|---|
| 115 | | if ((*i) == Glib::ustring("xin_-1")) |
|---|
| 116 | | foundfull = true; |
|---|
| 117 | | |
|---|
| 118 | | if (foundfull) { |
|---|
| 119 | | if (cfg->get_bg(Glib::ustring("xin_-1"), file, mode, bgcolor)) { |
|---|
| 120 | | program_log("setting full xinerama screen to %s", file.c_str()); |
|---|
| 121 | | SetBG::set_bg_xinerama(xinerama_info, xinerama_num_screens, Glib::ustring("xin_-1"), file, mode, bgcolor); |
|---|
| 122 | | program_log("done setting full xinerama screen"); |
|---|
| | 110 | // dirty, dirty hack to make sure we're not on some crazy 1 monitor display |
|---|
| | 111 | if (xinerama_num_screens > 1) { |
|---|
| | 112 | program_log("using xinerama"); |
|---|
| | 113 | |
|---|
| | 114 | bool foundfull = false; |
|---|
| | 115 | for (i=displist.begin(); i!=displist.end(); i++) |
|---|
| | 116 | if ((*i) == Glib::ustring("xin_-1")) |
|---|
| | 117 | foundfull = true; |
|---|
| | 118 | |
|---|
| | 119 | if (foundfull) { |
|---|
| | 120 | if (cfg->get_bg(Glib::ustring("xin_-1"), file, mode, bgcolor)) { |
|---|
| | 121 | program_log("setting full xinerama screen to %s", file.c_str()); |
|---|
| | 122 | SetBG::set_bg_xinerama(xinerama_info, xinerama_num_screens, Glib::ustring("xin_-1"), file, mode, bgcolor); |
|---|
| | 123 | program_log("done setting full xinerama screen"); |
|---|
| | 124 | } else { |
|---|
| | 125 | std::cerr << _("Could not get bg info for fullscreen xinerama") << std::endl; |
|---|
| | 126 | } |
|---|
| 124 | | std::cerr << _("Could not get bg info for fullscreen xinerama") << std::endl; |
|---|
| 125 | | } |
|---|
| 126 | | } else { |
|---|
| 127 | | |
|---|
| 128 | | // iterate through, pick out the xin_* |
|---|
| 129 | | for (i=displist.begin(); i!=displist.end(); i++) { |
|---|
| 130 | | if ((*i).find(Glib::ustring("xin_").c_str(), 0, 4) != Glib::ustring::npos) { |
|---|
| 131 | | if (cfg->get_bg((*i), file, mode, bgcolor)) { |
|---|
| 132 | | program_log("setting %s to %s", (*i).c_str(), file.c_str()); |
|---|
| 133 | | SetBG::set_bg_xinerama(xinerama_info, xinerama_num_screens, (*i), file, mode, bgcolor); |
|---|
| 134 | | program_log("done setting %s", (*i).c_str()); |
|---|
| 135 | | } else { |
|---|
| 136 | | std::cerr << _("Could not get bg info for") << " " << (*i) << std::endl; |
|---|
| | 128 | |
|---|
| | 129 | // iterate through, pick out the xin_* |
|---|
| | 130 | for (i=displist.begin(); i!=displist.end(); i++) { |
|---|
| | 131 | if ((*i).find(Glib::ustring("xin_").c_str(), 0, 4) != Glib::ustring::npos) { |
|---|
| | 132 | if (cfg->get_bg((*i), file, mode, bgcolor)) { |
|---|
| | 133 | program_log("setting %s to %s", (*i).c_str(), file.c_str()); |
|---|
| | 134 | SetBG::set_bg_xinerama(xinerama_info, xinerama_num_screens, (*i), file, mode, bgcolor); |
|---|
| | 135 | program_log("done setting %s", (*i).c_str()); |
|---|
| | 136 | } else { |
|---|
| | 137 | std::cerr << _("Could not get bg info for") << " " << (*i) << std::endl; |
|---|
| | 138 | } |
|---|