summaryrefslogtreecommitdiff
path: root/clients/screenshot.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-12-01 15:36:20 -0500
committerKristian Høgsberg <krh@bitplanet.net>2010-12-01 16:53:01 -0500
commit2bb3ebe1e437acf836449f0a63f3264ad29566f2 (patch)
tree85ed2d15bd8068742fac545873cedc36ced02410 /clients/screenshot.c
parent0611e3efc2e79e2df61f0225ebd47ef8f7b27c12 (diff)
downloadweston-2bb3ebe1e437acf836449f0a63f3264ad29566f2.tar.gz
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.
Diffstat (limited to 'clients/screenshot.c')
-rw-r--r--clients/screenshot.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/clients/screenshot.c b/clients/screenshot.c
index 8b7dd8b1..8f444609 100644
--- a/clients/screenshot.c
+++ b/clients/screenshot.c
@@ -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;