xcbXorg: Now properly connects to requested display *AND* screen
We append the desired screen number to the connection string.
This commit is contained in:
@@ -38,10 +38,11 @@ struct XcbConnection
|
|||||||
, connectionIdentifier(id)
|
, connectionIdentifier(id)
|
||||||
, refCount(0)
|
, refCount(0)
|
||||||
{
|
{
|
||||||
// Convert display number to X display string format (e.g., ":0")
|
// Convert to X display string format (e.g., ":0.1")
|
||||||
std::string displayString = ":" + std::to_string(id.display);
|
std::string displayString = ":" + std::to_string(id.display)
|
||||||
int screenNum;
|
+ "." + std::to_string(id.screen);
|
||||||
|
|
||||||
|
int screenNum;
|
||||||
connection.reset(xcb_connect(displayString.c_str(), &screenNum));
|
connection.reset(xcb_connect(displayString.c_str(), &screenNum));
|
||||||
if (xcb_connection_has_error(connection.get()))
|
if (xcb_connection_has_error(connection.get()))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user