From 5e823b5a25782b0dfe151e77e2e4cee373e10e48 Mon Sep 17 00:00:00 2001 From: IoI_xD Date: Mon, 23 Mar 2026 19:30:21 -0700 Subject: [PATCH] wayland: gl improvements --- src/backend/wayland.c | 4 ++-- src/widget/opengl.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/backend/wayland.c b/src/backend/wayland.c index dbb2bd2..dab1a1b 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -441,13 +441,13 @@ static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time 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) { + 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) { + if((self->wayland.last_time + 50) <= time && !self->wayland.events_pending && !self->wayland.always_render) { MwLLDispatch(self, draw, NULL); self->wayland.last_time = time; } diff --git a/src/widget/opengl.c b/src/widget/opengl.c index 6d67344..7d685ad 100644 --- a/src/widget/opengl.c +++ b/src/widget/opengl.c @@ -168,11 +168,10 @@ static int create(MwWidget handle) { waylandopengl_t* o = r = malloc(sizeof(*o)); MwLL topmost_parent = handle->lowlevel->wayland.parent; handle->lowlevel->wayland.always_render = MwTRUE; - topmost_parent->wayland.always_render = MwTRUE; while(topmost_parent->wayland.parent != NULL) { - topmost_parent = topmost_parent->wayland.parent; topmost_parent->wayland.always_render = MwTRUE; + topmost_parent = topmost_parent->wayland.parent; } display =