Hi,

I wrote a small program to understand wayland-server. Below is the program:
#include <stdio.h>
#include <wayland-server.h>

const char socket_name[] = "test_socket";

int main()
{
        struct wl_display *test_display = NULL;
        int stat = 0;

        test_display = wl_display_create();
        if (test_display)
                fprintf(stderr, "Created wayland display successfully\n");
        else
                fprintf(stderr, "Failed to created wayland display\n");

        stat = wl_display_add_socket(test_display, socket_name);
        if (stat)
                fprintf(stderr, "Successfully connected to wayland
display\n");
        else
                fprintf(stderr, "Failed to connect to wayland display\n");

        return 0;
}

When I run I get the below output:
Created wayland display successfully
Failed to connect to wayland display

Why is it failing to connect to wayland display?

Thank-you,
Hebbar

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to