diff --git a/configure b/configure index 1c06c0d..3cfe050 100755 --- a/configure +++ b/configure @@ -46,6 +46,10 @@ param_set("vulkan-string-helper", 1); param_set("shared", 1); param_set("static", 1); param_set("examples", 1); +print($target); +if($target eq "Linux") { + param_set("wayland", 1); +} my %features = ( "classic-theme" => "use classic theme", @@ -58,7 +62,7 @@ my %features = ( "vulkan-string-helper" => "use Vulkan string helper", "shared" => "build shared library", "static" => "build static library", - "wayland" => "enable ayland backend", + "wayland" => "enable wayland backend", ); my @features_keys = ( "1classic-theme", "1stb-image", diff --git a/src/backend/wayland.c b/src/backend/wayland.c index 1d1d2b8..5ba779b 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -2026,11 +2026,17 @@ static int MwLLPendingImpl(MwLL handle) { handle->wayland.did_initial_resize = 1; } - if(!MwWaylandAlwaysRender) wl_display_prepare_read(handle->wayland.display); - if(!poll(&fd, 1, timeout.tv_nsec)) { - wl_display_cancel_read(handle->wayland.display); + if(!MwWaylandAlwaysRender) { + wl_display_prepare_read(handle->wayland.display); + if(!poll(&fd, 1, timeout.tv_nsec)) { + wl_display_cancel_read(handle->wayland.display); + } else { + wl_display_read_events(handle->wayland.display); + if((pending = wl_display_dispatch_pending(handle->wayland.display)) < 0) { + wl_display_cancel_read(handle->wayland.display); + } + } } else { - if(!MwWaylandAlwaysRender) wl_display_read_events(handle->wayland.display); if((pending = wl_display_dispatch_pending(handle->wayland.display)) < 0) { wl_display_cancel_read(handle->wayland.display); } diff --git a/src/widget/opengl.c b/src/widget/opengl.c index 0afbe9a..bf06981 100644 --- a/src/widget/opengl.c +++ b/src/widget/opengl.c @@ -205,9 +205,8 @@ static int create(MwWidget handle) { 1, EGL_NONE}; EGLDisplay display; - waylandopengl_t* o = r = malloc(sizeof(*o)); - MwLL topmost_parent = handle->lowlevel->wayland.parent; - MwWaylandAlwaysRender = MwTRUE; + waylandopengl_t* o = r = malloc(sizeof(*o)); + MwWaylandAlwaysRender = MwTRUE; o->gllib = MwDynamicOpen("libEGL.so"); if(!o->gllib) {