blob: 3687865da2312fc9313b1b85392bdbd33e898385 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include <wayland-server.h>
#include <stdio.h>
#include <stdlib.h>
static void die(char const* s)
{
perror(s);
exit(EXIT_FAILURE);
}
int main(int argc, char** argv)
{
struct wl_display* disp = wl_display_create();
if (!disp) { die("wl_display_create"); }
char const* sock = wl_display_add_socket_auto(disp);
if (!sock) { die("wl_display_add_socket_auto"); }
printf("Compositor running on %s\n", sock);
wl_display_run(disp);
wl_display_destroy(disp);
return EXIT_SUCCESS;
}
|