wait for compositor
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <poll.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
#include <xkbcommon/xkbcommon.h>
|
#include <xkbcommon/xkbcommon.h>
|
||||||
@@ -321,11 +322,8 @@ waylandthread(void *_)
|
|||||||
|
|
||||||
(void)_;
|
(void)_;
|
||||||
threadsetname("wayland");
|
threadsetname("wayland");
|
||||||
dpy = wl_display_connect(nil);
|
while((dpy = wl_display_connect(nil)) == nil)
|
||||||
if(dpy == nil){
|
poll(nil, 0, 1000);
|
||||||
fprint(2, "strans: wayland: cannot connect to display\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
xkb = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
|
xkb = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
|
||||||
if(xkb == nil){
|
if(xkb == nil){
|
||||||
wl_display_disconnect(dpy);
|
wl_display_disconnect(dpy);
|
||||||
|
|||||||
Reference in New Issue
Block a user