X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2FBaseDisplay.cc;h=aa2d974ee83b2ef17e0f2b356d9e26e3caefc3e4;hb=6716bd33235b6fda4aeea75aea7c446e9f27fe40;hp=8be0a7f781e91e58d183dfe26b70a612b49ee55d;hpb=1766453ca2ce30adf84798cb504e8b4d258bd08f;p=chaz%2Fopenbox diff --git a/src/BaseDisplay.cc b/src/BaseDisplay.cc index 8be0a7f7..aa2d974e 100644 --- a/src/BaseDisplay.cc +++ b/src/BaseDisplay.cc @@ -78,7 +78,7 @@ extern "C" { #endif // HAVE_SYS_WAIT_H } -#include +#include using std::string; #include "i18n.hh" @@ -417,7 +417,7 @@ ScreenInfo::ScreenInfo(BaseDisplay *d, unsigned int num) { HeightOfScreen(ScreenOfDisplay(basedisplay->getXDisplay(), screen_number))); /* - If the default depth is at least 15 we will use that, + If the default depth is at least 8 we will use that, otherwise we try to find the largest TrueColor visual. Preference is given to 24 bit over larger depths if 24 bit is an option. */ @@ -426,7 +426,7 @@ ScreenInfo::ScreenInfo(BaseDisplay *d, unsigned int num) { visual = DefaultVisual(basedisplay->getXDisplay(), screen_number); colormap = DefaultColormap(basedisplay->getXDisplay(), screen_number); - if (depth < 15) { + if (depth < 8) { // search for a TrueColor Visual... if we can't find one... // we will use the default visual for the screen XVisualInfo vinfo_template, *vinfo_return; @@ -468,7 +468,6 @@ ScreenInfo::ScreenInfo(BaseDisplay *d, unsigned int num) { if (pos != string::npos) default_string.resize(pos); - std::ostringstream formatter; - formatter << "DISPLAY=" << default_string << '.' << screen_number; - display_string = formatter.str(); + display_string = string("DISPLAY=") + default_string + '.' + + itostring(static_cast(screen_number)); }