mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-09 13:29:48 -05:00
Create socket in /var/run/user/${HOME}
Use the runtime dir from XDG Base Directory Specification for creating the socket in a directory only the user can read and write.
This commit is contained in:
parent
0611e3efc2
commit
2bb3ebe1e4
11 changed files with 99 additions and 51 deletions
|
|
@ -1337,8 +1337,6 @@ display_handle_global(struct wl_display *display, uint32_t id,
|
|||
}
|
||||
}
|
||||
|
||||
static const char socket_name[] = "\0wayland";
|
||||
|
||||
static void
|
||||
display_render_frame(struct display *d)
|
||||
{
|
||||
|
|
@ -1425,7 +1423,7 @@ display_create(int *argc, char **argv[], const GOptionEntry *option_entries)
|
|||
if (d == NULL)
|
||||
return NULL;
|
||||
|
||||
d->display = wl_display_connect(socket_name, sizeof socket_name);
|
||||
d->display = wl_display_connect(NULL);
|
||||
if (d->display == NULL) {
|
||||
fprintf(stderr, "failed to create display: %m\n");
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue