swap buffers on all children

This commit is contained in:
IoIxD 2025-12-07 19:33:16 -07:00
commit 1e5ff44d79
3 changed files with 14 additions and 13 deletions

1
.clangd Normal file
View file

@ -0,0 +1 @@
header-insertion: never

View file

@ -821,6 +821,7 @@ static void MwLLLineImpl(MwLL handle, MwPoint* points, MwLLColor color) {
} }
static void MwLLBeginDrawImpl(MwLL handle) { 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)) { if(!eglMakeCurrent(handle->wayland.egl_display, handle->wayland.egl_surface, handle->wayland.egl_surface, handle->wayland.egl_context)) {
printf("ERROR: eglMakeCurrent, %0X\n", eglGetError()); printf("ERROR: eglMakeCurrent, %0X\n", eglGetError());
return; return;
@ -861,6 +862,7 @@ static void MwLLEndDrawImpl(MwLL handle) {
wl_surface_damage(handle->wayland.surface, 0, 0, handle->wayland.ww, handle->wayland.wh); 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)) { if(!eglSwapBuffers(handle->wayland.egl_display, handle->wayland.egl_surface)) {
printf("error swapping buffers! %0X\n", eglGetError()); printf("error swapping buffers! %0X\n", eglGetError());
} else { } else {

View file

@ -7,7 +7,6 @@ static void lldrawhandler(MwLL handle, void* data) {
MwWidget h = (MwWidget)handle->common.user; MwWidget h = (MwWidget)handle->common.user;
(void)data; (void)data;
if(handle->wayland.parent == NULL)
MwLLBeginDraw(handle); MwLLBeginDraw(handle);
h->bgcolor = NULL; h->bgcolor = NULL;
@ -15,7 +14,6 @@ static void lldrawhandler(MwLL handle, void* data) {
if(h->draw_inject != NULL) h->draw_inject(h); if(h->draw_inject != NULL) h->draw_inject(h);
MwDispatchUserHandler(h, MwNdrawHandler, NULL); MwDispatchUserHandler(h, MwNdrawHandler, NULL);
if(handle->wayland.parent == NULL)
MwLLEndDraw(handle); MwLLEndDraw(handle);
} }