Fixed handling of DISPLAY=127.0.0.1:2 usage.

This commit is contained in:
Robert Osfield 2013-06-28 14:07:31 +00:00
parent 353b18b27b
commit 5db57cfa34

View File

@ -113,8 +113,11 @@ void GraphicsContext::ScreenIdentifier::setScreenIdentifier(const std::string& d
std::string::size_type colon = displayName.find_last_of(':');
std::string::size_type point = displayName.find_last_of('.');
// handle the case where the host name is supplied with '.' such as 127.0.0.1:0 with only DisplayNum provided
// here the point to picks up on the .1 from the host name, rather then demarking the DisplayNum/ScreenNum as
// no ScreenNum is provided, hence no . in the rhs of the :
if (point!=std::string::npos &&
colon==std::string::npos &&
colon!=std::string::npos &&
point < colon) point = std::string::npos;
if (colon==std::string::npos)