properly implemented xcb check for stale sockets
(cherry picked from commit f543cb8fbb
)
This commit is contained in:
parent
be05ef82d5
commit
bf1f49c530
|
@ -614,20 +614,9 @@ display_exists_p (int number)
|
||||||
if (access (buf, F_OK) != 0)
|
if (access (buf, F_OK) != 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* This is a private function that we shouldn't really be calling,
|
|
||||||
but it's the best way to see if the server exists (without
|
|
||||||
needing to hold the necessary authentication to use it) */
|
|
||||||
|
|
||||||
sprintf (buf, ":%d", number);
|
sprintf (buf, ":%d", number);
|
||||||
/* conn = _X11TransConnectDisplay (buf, &fullname, &idisplay, &iscreen,
|
if (xcb_connection_has_error(conn)) return FALSE;
|
||||||
&conn_auth_name, &conn_auth_namelen,
|
|
||||||
&conn_auth_data, &conn_auth_datalen); */
|
|
||||||
conn = xcb_connect(buf, NULL);
|
|
||||||
|
|
||||||
if (conn == NULL)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
// _XDisconnectDisplay (conn);
|
|
||||||
xcb_disconnect(conn);
|
xcb_disconnect(conn);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user