wait for compositor
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <poll.h>
|
||||
#include <sys/mman.h>
|
||||
#include <wayland-client.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user