On Fri, 10 Oct 2014 15:32:54 +0530 Srivardhan <sri.heb...@samsung.com> wrote:
> 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? wl_display_add_socket() returns 0 on success. Otherwise reuturns -1. See: http://cgit.freedesktop.org/wayland/wayland/tree/src/wayland-server.c#n1185 So your call to wl_display_add_socket() seems to succeed. Thanks. -- Ryo Munakata <ryomnk...@gmail.com> _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel