Compare commits
1 commit
fd39a0aa1c
...
373c70f300
| Author | SHA1 | Date | |
|---|---|---|---|
| 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);
|
// arrpush(parent->wayland.subsurfaces, r);
|
||||||
|
|
||||||
r->wayland.configured = MwTRUE;
|
r->wayland.configured = MwTRUE;
|
||||||
if(!r->wayland.egl_setup) {
|
r->wayland.egl_context = topmost_parent->wayland.egl_context;
|
||||||
r->wayland.egl_setup = egl_setup(r, r->wayland.ww, r->wayland.wh);
|
r->wayland.egl_display = topmost_parent->wayland.egl_display;
|
||||||
MwLLForceRender(r);
|
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);
|
arrpush(parent->wayland.subwidgets, r);
|
||||||
}
|
}
|
||||||
|
|
@ -821,16 +822,15 @@ 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)) {
|
|
||||||
printf("ERROR: eglMakeCurrent, %0X\n", eglGetError());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MwLLEndDrawImpl(MwLL handle) {
|
static void MwLLEndDrawImpl(MwLL handle) {
|
||||||
int w, h;
|
int w, h;
|
||||||
|
|
||||||
|
if(handle->wayland.parent != NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(handle->wayland.type == MWLL_WAYLAND_TOPLEVEL) {
|
if(handle->wayland.type == MWLL_WAYLAND_TOPLEVEL) {
|
||||||
w = handle->wayland.ww;
|
w = handle->wayland.ww;
|
||||||
h = handle->wayland.wh;
|
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);
|
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 {
|
wl_surface_commit(handle->wayland.surface);
|
||||||
wl_surface_commit(handle->wayland.surface);
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) {
|
static MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue