|
|
@ -214,7 +214,7 @@ bool server_init(struct sway_server *server) {
|
|
|
|
// Avoid using "wayland-0" as display socket
|
|
|
|
// Avoid using "wayland-0" as display socket
|
|
|
|
char name_candidate[16];
|
|
|
|
char name_candidate[16];
|
|
|
|
for (int i = 1; i <= 32; ++i) {
|
|
|
|
for (int i = 1; i <= 32; ++i) {
|
|
|
|
sprintf(name_candidate, "wayland-%d", i);
|
|
|
|
snprintf(name_candidate, sizeof(name_candidate), "wayland-%d", i);
|
|
|
|
if (wl_display_add_socket(server->wl_display, name_candidate) >= 0) {
|
|
|
|
if (wl_display_add_socket(server->wl_display, name_candidate) >= 0) {
|
|
|
|
server->socket = strdup(name_candidate);
|
|
|
|
server->socket = strdup(name_candidate);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|