From 1ad75eca90e76ba44c73fd691f84e00d031f1859 Mon Sep 17 00:00:00 2001 From: IoI_xD Date: Tue, 24 Mar 2026 14:41:20 -0700 Subject: [PATCH] only draw on the parent and resize on the child in draw_n_resize --- src/backend/wayland.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/backend/wayland.c b/src/backend/wayland.c index b2bbe8f..8d39d6b 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -102,11 +102,9 @@ static void wl_flush(MwLL handle) { static void recursive_dispatch_draw_n_resize(MwLL handle) { MwWidget h = (MwWidget)handle->common.user; MwLLDispatch(handle, draw, NULL); - MwLLDispatch(handle, resize, NULL); if(h) { int i; for(i = 0; i < arrlen(h->children); i++) { - MwDispatch(h->children[i], draw); MwDispatch(h->children[i], resize); if(arrlen(h->children[i]->children) > 0) { recursive_dispatch_draw_n_resize(h->children[i]->lowlevel); @@ -483,23 +481,6 @@ static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time MwLLDispatch(currentlyHeldWidget, down, &p); } - /* We want to send a draw call whenever we move the cursor, BUT only if the topmost parent doesn't already have events pedngin. */ - if(self->wayland.parent) { - MwLL topmost = self->wayland.parent; - while(topmost->wayland.parent) topmost = topmost->wayland.parent; - /* also we only wanna do it every 50ms */ - if((self->wayland.last_time + 50) <= time && !topmost->wayland.events_pending && !topmost->wayland.always_render) { - MwLLDispatch(self, draw, NULL); - self->wayland.last_time = time; - } - } else { - /* if there's no parent just impose the requirement on the widget itself */ - if((self->wayland.last_time + 50) <= time && !self->wayland.events_pending && !self->wayland.always_render) { - MwLLDispatch(self, draw, NULL); - self->wayland.last_time = time; - } - } - WAYLAND_EVENT_OP_END(self); };