try reverting
This commit is contained in:
parent
1e5ff44d79
commit
373c70f300
1 changed files with 15 additions and 16 deletions
|
|
@ -648,11 +648,12 @@ static void setup_subsurface(MwLL parent, MwLL r, int x, int y) {
|
|||
|
||||
// arrpush(parent->wayland.subsurfaces, r);
|
||||
|
||||
r->wayland.configured = MwTRUE;
|
||||
if(!r->wayland.egl_setup) {
|
||||
r->wayland.egl_setup = egl_setup(r, r->wayland.ww, r->wayland.wh);
|
||||
MwLLForceRender(r);
|
||||
};
|
||||
r->wayland.configured = MwTRUE;
|
||||
r->wayland.egl_context = topmost_parent->wayland.egl_context;
|
||||
r->wayland.egl_display = topmost_parent->wayland.egl_display;
|
||||
r->wayland.egl_surface = topmost_parent->wayland.egl_surface;
|
||||
r->wayland.fbo = topmost_parent->wayland.fbo;
|
||||
r->wayland.fbo_texture = topmost_parent->wayland.fbo_texture;
|
||||
|
||||
arrpush(parent->wayland.subwidgets, r);
|
||||
}
|
||||
|
|
@ -821,16 +822,15 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
static void MwLLEndDrawImpl(MwLL handle) {
|
||||
int w, h;
|
||||
|
||||
if(handle->wayland.parent != NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(handle->wayland.type == MWLL_WAYLAND_TOPLEVEL) {
|
||||
w = handle->wayland.ww;
|
||||
h = handle->wayland.wh;
|
||||
|
|
@ -862,12 +862,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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue