diff --git a/senseApis/xcbXorg/xcbXorg.cpp b/senseApis/xcbXorg/xcbXorg.cpp index 79841d3..052be38 100644 --- a/senseApis/xcbXorg/xcbXorg.cpp +++ b/senseApis/xcbXorg/xcbXorg.cpp @@ -38,10 +38,11 @@ struct XcbConnection , connectionIdentifier(id) , refCount(0) { - // Convert display number to X display string format (e.g., ":0") - std::string displayString = ":" + std::to_string(id.display); - int screenNum; + // Convert to X display string format (e.g., ":0.1") + std::string displayString = ":" + std::to_string(id.display) + + "." + std::to_string(id.screen); + int screenNum; connection.reset(xcb_connect(displayString.c_str(), &screenNum)); if (xcb_connection_has_error(connection.get())) {