From b441f236b405cc3daf873059fd18fda04276a522 Mon Sep 17 00:00:00 2001 From: IoIxD Date: Sun, 7 Dec 2025 19:12:59 -0700 Subject: [PATCH] have children swap buffers on the playground --- src/backend/wayland.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/backend/wayland.c b/src/backend/wayland.c index b1a1a81..a7819d2 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -828,11 +828,10 @@ static void MwLLLineImpl(MwLL handle, MwPoint* points, MwLLColor color) { } static void MwLLBeginDrawImpl(MwLL handle) { - if(handle->wayland.parent == NULL) - if(!eglMakeCurrent(handle->wayland.egl_display, handle->wayland.egl_surface, handle->wayland.egl_surface, handle->wayland.egl_context)) { - printf("ERROR: eglMakeCurrent, %0X\n", eglGetError()); - return; - } + if(!eglMakeCurrent(handle->wayland.egl_display, handle->wayland.egl_surface, handle->wayland.egl_surface, handle->wayland.egl_context)) { + printf("ERROR: eglMakeCurrent, %0X\n", eglGetError()); + return; + } } static void MwLLEndDrawImpl(MwLL handle) { @@ -869,12 +868,11 @@ static void MwLLEndDrawImpl(MwLL handle) { wl_surface_damage(handle->wayland.surface, 0, 0, handle->wayland.ww, handle->wayland.wh); - if(handle->wayland.parent == NULL) - if(!eglSwapBuffers(handle->wayland.egl_display, handle->wayland.egl_surface)) { - printf("error swapping buffers! %0X\n", eglGetError()); - } else { - wl_surface_commit(handle->wayland.surface); - } + if(!eglSwapBuffers(handle->wayland.egl_display, handle->wayland.egl_surface)) { + printf("error swapping buffers! %0X\n", eglGetError()); + } else { + wl_surface_commit(handle->wayland.surface); + } } static MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) {