diff options
author | Jeff Becker <ampernand@gmail.com> | 2016-10-17 10:25:24 -0400 |
---|---|---|
committer | Jeff Becker <ampernand@gmail.com> | 2016-10-17 10:25:24 -0400 |
commit | d0c2ee3bcc98fbe16e9d697197fef63939af2b8a (patch) | |
tree | 696d3fc804d95261ec9feae0af3e5d6d4bd62bb4 | |
parent | ce1da9219745261f04610cd1846c6438d7ab8c4d (diff) | |
download | wterm-d0c2ee3bcc98fbe16e9d697197fef63939af2b8a.zip wterm-d0c2ee3bcc98fbe16e9d697197fef63939af2b8a.tar.gz wterm-d0c2ee3bcc98fbe16e9d697197fef63939af2b8a.tar.bz2 |
fix
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/st.c | 20 |
2 files changed, 13 insertions, 9 deletions
@@ -20,7 +20,7 @@ SOURCES += $(wildcard $(WLDSRC)/nouveau/*.c) CFLAGS += -DWITH_NOUVEAU_DRM endif -CFLAGS += -std=c99 -Wall -g +CFLAGS += -std=c99 -Wall -g -DWITH_WAYLAND_DRM -DWITH_WAYLAND_SHM CFLAGS += $(shell pkg-config --cflags $(PKGS)) -I include LDFLAGS = $(shell pkg-config --libs $(PKGS)) -lm -lutil @@ -3202,14 +3202,16 @@ wlinit(void) registry = wl_display_get_registry(wl.dpy); wl_registry_add_listener(registry, ®listener, NULL); - wld.ctx = wld_wayland_create_context(wl.dpy, WLD_ANY); - if(!wld.ctx) - die("could not create wayland context"); - wld.renderer = wld_create_renderer(wld.ctx); - if(!wld.renderer) - die("could not create wayland rendering context"); - wl_display_roundtrip(wl.dpy); - + + wl_display_dispatch(wl.dpy); + wl_display_roundtrip(wl.dpy); + + wld.ctx = wld_wayland_create_context(wl.dpy, WLD_ANY); + if (!wld.ctx) + die("Can't create wayland context\n"); + wld.renderer = wld_create_renderer(wld.ctx); + if (!wld.ctx) + die("Can't create renderer\n"); if (!wl.shm) die("Display has no SHM\n"); if (!wl.seat) @@ -3217,6 +3219,8 @@ wlinit(void) if (!wl.datadevmanager) die("Display has no data device manager\n"); + wl_display_roundtrip(wl.dpy); + wl.keyboard = wl_seat_get_keyboard(wl.seat); wl_keyboard_add_listener(wl.keyboard, &kbdlistener, NULL); wl.pointer = wl_seat_get_pointer(wl.seat); |