aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--swaynag/swaynag.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/swaynag/swaynag.c b/swaynag/swaynag.c
index 6c326ca8..d9bec368 100644
--- a/swaynag/swaynag.c
+++ b/swaynag/swaynag.c
@@ -445,7 +445,10 @@ void swaynag_setup(struct swaynag *swaynag) {
struct wl_registry *registry = wl_display_get_registry(swaynag->display);
wl_registry_add_listener(registry, &registry_listener, swaynag);
- wl_display_roundtrip(swaynag->display);
+ if (wl_display_roundtrip(swaynag->display) < 0) {
+ sway_abort("failed to register with the wayland display");
+ }
+
assert(swaynag->compositor && swaynag->layer_shell && swaynag->shm);
while (swaynag->querying_outputs > 0) {