From 82a85116611092adf5c5f1f1f2ce6a02174fa6d3 Mon Sep 17 00:00:00 2001 From: Leon Henrik Plickat Date: Mon, 13 Dec 2021 20:30:55 +0100 Subject: Even more cleanup and commenting things --- src/wlclock.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/wlclock.c') diff --git a/src/wlclock.c b/src/wlclock.c index fefc480..bc88ca4 100644 --- a/src/wlclock.c +++ b/src/wlclock.c @@ -188,14 +188,12 @@ static bool init_wayland (void) /* Get registry and add listeners. */ clocklog(2, "[main] Get wl_registry.\n"); - if ( NULL == (context.registry = wl_display_get_registry(context.display)) ) - { - clocklog(0, "ERROR: Can not get registry.\n"); - return false; - } + context.registry = wl_display_get_registry(context.display); + wl_registry_add_listener(context.registry, ®istry_listener, NULL); /* Allow registry listeners to catch up. */ + // TODO use sync instead if ( wl_display_roundtrip(context.display) == -1 ) { clocklog(0, "ERROR: Roundtrip failed.\n"); -- cgit v1.2.3