swap buffers on all children
This commit is contained in:
parent
3305756af8
commit
1e5ff44d79
3 changed files with 14 additions and 13 deletions
1
.clangd
Normal file
1
.clangd
Normal file
|
|
@ -0,0 +1 @@
|
|||
header-insertion: never
|
||||
|
|
@ -821,10 +821,11 @@ static void MwLLLineImpl(MwLL handle, MwPoint* points, MwLLColor color) {
|
|||
}
|
||||
|
||||
static void MwLLBeginDrawImpl(MwLL handle) {
|
||||
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(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;
|
||||
}
|
||||
}
|
||||
|
||||
static void MwLLEndDrawImpl(MwLL handle) {
|
||||
|
|
@ -861,11 +862,12 @@ static void MwLLEndDrawImpl(MwLL handle) {
|
|||
|
||||
wl_surface_damage(handle->wayland.surface, 0, 0, handle->wayland.ww, handle->wayland.wh);
|
||||
|
||||
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(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);
|
||||
}
|
||||
}
|
||||
|
||||
static MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) {
|
||||
|
|
|
|||
|
|
@ -7,16 +7,14 @@ static void lldrawhandler(MwLL handle, void* data) {
|
|||
MwWidget h = (MwWidget)handle->common.user;
|
||||
|
||||
(void)data;
|
||||
if(handle->wayland.parent == NULL)
|
||||
MwLLBeginDraw(handle);
|
||||
MwLLBeginDraw(handle);
|
||||
|
||||
h->bgcolor = NULL;
|
||||
MwDispatch(h, draw);
|
||||
if(h->draw_inject != NULL) h->draw_inject(h);
|
||||
MwDispatchUserHandler(h, MwNdrawHandler, NULL);
|
||||
|
||||
if(handle->wayland.parent == NULL)
|
||||
MwLLEndDraw(handle);
|
||||
MwLLEndDraw(handle);
|
||||
}
|
||||
|
||||
static void lluphandler(MwLL handle, void* data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue