diff options
author | Leon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de> | 2021-12-13 20:30:55 +0100 |
---|---|---|
committer | Leon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de> | 2021-12-13 20:30:55 +0100 |
commit | 82a85116611092adf5c5f1f1f2ce6a02174fa6d3 (patch) | |
tree | 886b7e1a3ef5b14042b7a71a0b27f4335db62901 /src/wlclock.c | |
parent | ff8142eeb28178deae0e92dee1a619356721c21e (diff) | |
download | wlclock-82a85116611092adf5c5f1f1f2ce6a02174fa6d3.tar.gz wlclock-82a85116611092adf5c5f1f1f2ce6a02174fa6d3.tar.bz2 |
Even more cleanup and commenting things
Diffstat (limited to '')
-rw-r--r-- | src/wlclock.c | 8 |
1 files changed, 3 insertions, 5 deletions
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"); |