diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | main.c | 13 |
2 files changed, 12 insertions, 3 deletions
@@ -1,7 +1,7 @@ all: build/phonelock build/phonelock: build main.c wayland-client.h wayland-protocol.c - gcc -Wall -o build/phonelock main.c + gcc -Wall -o build/phonelock main.c -lwayland-client build: mkdir -p build @@ -1,9 +1,18 @@ #include <stdio.h> +#include <wayland-client.h> -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; } |