diff --git a/src/backend/wayland.c b/src/backend/wayland.c index e049bbea..1e32e2cd 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -1404,8 +1404,6 @@ static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) { setup_toplevel(r, x, y); } else { setup_sublevel(parent, r, x, y); - MwLLDispatch(parent, draw, NULL); - parent->wayland.events_pending += 1; } framebuffer_setup(&r->wayland); @@ -1414,6 +1412,9 @@ static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) { region_setup(r); MwLLForceRender(r); + if(parent != NULL) { + MwLLForceRender(parent); + } return r; } @@ -1504,10 +1505,6 @@ static void MwLLSetXYImpl(MwLL handle, int x, int y) { MwLLDispatch(handle, draw, NULL); handle->wayland.events_pending += 1; - if(handle->wayland.parent != NULL) { - MwLLDispatch(handle->wayland.parent, draw, NULL); - handle->wayland.parent->wayland.events_pending += 1; - } } static void MwLLSetWHImpl(MwLL handle, int w, int h) { @@ -1531,9 +1528,7 @@ refresh: framebuffer_destroy(&handle->wayland); framebuffer_setup(&handle->wayland); - if(handle->wayland.parent != NULL) { - MwLLDispatch(handle->wayland.parent, draw, NULL); - } + MwLLDispatch(handle, draw, NULL); } static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) {