From bb177c6e2c4f70165405034b0d3355affde3c859 Mon Sep 17 00:00:00 2001 From: xengineering Date: Wed, 4 Jan 2023 20:26:48 +0100 Subject: Implement first connection to Wayland compositor --- main.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 5663924..1bbc885 100644 --- a/main.c +++ b/main.c @@ -1,9 +1,18 @@ #include +#include -int main(void) { - printf("Hello world!\n"); +int main(void) +{ + struct wl_display *display = wl_display_connect(NULL); + if (!display) { + fprintf(stderr, "Failed to connect to Wayland display.\n"); + return 1; + } + fprintf(stderr, "Connection established!\n"); + + wl_display_disconnect(display); return 0; } -- cgit v1.2.3-70-g09d2