mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-17 06:59:46 -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
|
|
@ -35,8 +35,6 @@
|
|||
* the compositor and serves as a test bed for implementing client
|
||||
* side marshalling outside libwayland.so */
|
||||
|
||||
static const char socket_name[] = "\0wayland";
|
||||
|
||||
static void
|
||||
handle_global(struct wl_display *display, uint32_t id,
|
||||
const char *interface, uint32_t version, void *data)
|
||||
|
|
@ -54,7 +52,7 @@ int main(int argc, char *argv[])
|
|||
GSource *source;
|
||||
struct wl_screenshooter *screenshooter;
|
||||
|
||||
display = wl_display_connect(socket_name, sizeof socket_name);
|
||||
display = wl_display_connect(NULL);
|
||||
if (display == NULL) {
|
||||
fprintf(stderr, "failed to create display: %m\n");
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue