Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libglfork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,19 @@ struct EarlyInitializer {
strncpy(addr.sun_path, getconf(BUMBLEBEE_SOCKET), sizeof(addr.sun_path));
die_if(connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0,
"failed to connect to Bumblebee daemon: %s\n", strerror(errno));
static char c[256];
static char c[2048];
if (!getenv("PRIMUS_DISPLAY"))
{
send(sock, "Q VirtualDisplay", strlen("Q VirtualDisplay") + 1, 0);
recv(sock, &c, 255, 0);
recv(sock, &c, sizeof(c) - 1, 0);
die_if(memcmp(c, "Value: ", strlen("Value: ")), "unexpected query response\n");
*strchrnul(c, '\n') = 0;
*adpy_strp = strdup(c + 7);
}
if (!getenv("PRIMUS_libGLa"))
{
send(sock, "Q LibraryPath", strlen("Q LibraryPath") + 1, 0);
recv(sock, &c, 255, 0);
recv(sock, &c, sizeof(c) - 1, 0);
die_if(memcmp(c, "Value: ", strlen("Value: ")), "unexpected query response\n");
*strchrnul(c, '\n') = 0;
int npaths = 0;
Expand All @@ -202,7 +202,7 @@ struct EarlyInitializer {
}
}
send(sock, "C", 1, 0);
recv(sock, &c, 255, 0);
recv(sock, &c, sizeof(c) - 1, 0);
die_if(c[0] == 'N', "Bumblebee daemon reported: %s\n", c + 5);
die_if(c[0] != 'Y', "failure contacting Bumblebee daemon\n");
// the socket will be closed when the application quits, then bumblebee will shut down the secondary X
Expand Down