mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-06 08:27:00 +00:00
Detect XShm extension sanely
The previous way XShm detection worked failed at least for me, and is not the standard way. We now just use XShmQueryExtension and XShmQueryVersion.
This commit is contained in:
parent
c39f9e4a5b
commit
43a61bb6fe
@ -2169,9 +2169,8 @@ void Platform::init()
|
||||
{
|
||||
int err, ev;
|
||||
int threads_enable;
|
||||
int connection_fd;
|
||||
socklen_t sock_len;
|
||||
struct sockaddr sock_addr;
|
||||
int major, minor;
|
||||
Bool pixmaps;
|
||||
|
||||
DBG(0, "");
|
||||
|
||||
@ -2184,9 +2183,8 @@ void Platform::init()
|
||||
THROW("open X display failed");
|
||||
}
|
||||
|
||||
connection_fd = ConnectionNumber(x_display);
|
||||
if (!getsockname(connection_fd, &sock_addr, &sock_len) &&
|
||||
XShmQueryExtension(x_display) && sock_addr.sa_family == AF_UNIX ) {
|
||||
if (XShmQueryExtension (x_display) &&
|
||||
XShmQueryVersion (x_display, &major, &minor, &pixmaps)) {
|
||||
x_shm_avail = true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user