diff --git a/wayland.c b/wayland.c index dbd2dee..38942bc 100644 --- a/wayland.c +++ b/wayland.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -321,11 +322,8 @@ waylandthread(void *_) (void)_; threadsetname("wayland"); - dpy = wl_display_connect(nil); - if(dpy == nil){ - fprint(2, "strans: wayland: cannot connect to display\n"); - return; - } + while((dpy = wl_display_connect(nil)) == nil) + poll(nil, 0, 1000); xkb = xkb_context_new(XKB_CONTEXT_NO_FLAGS); if(xkb == nil){ wl_display_disconnect(dpy);