mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
init xwm only once Xwayland server is ready
This commit is contained in:
parent
3cc5b1acc6
commit
6eb20fb8d2
3 changed files with 32 additions and 9 deletions
|
|
@ -83,6 +83,9 @@ void unlink_sockets(int display) {
|
|||
|
||||
snprintf(sun_path, sizeof(sun_path), socket_fmt, display);
|
||||
unlink(sun_path);
|
||||
|
||||
snprintf(sun_path, sizeof(sun_path), lock_fmt, display);
|
||||
unlink(sun_path);
|
||||
}
|
||||
|
||||
int open_display_sockets(int socks[2]) {
|
||||
|
|
@ -121,7 +124,7 @@ int open_display_sockets(int socks[2]) {
|
|||
}
|
||||
long int read_pid;
|
||||
read_pid = strtol(pid, &end_pid, 10);
|
||||
if (read_pid < 0 || read_pid > INT32_MAX || end_pid != pid + sizeof(pid)) {
|
||||
if (read_pid < 0 || read_pid > INT32_MAX || end_pid != pid + sizeof(pid) - 2) {
|
||||
continue;
|
||||
}
|
||||
errno = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue