wayland: gl improvements

This commit is contained in:
IoI_xD 2026-03-23 19:30:21 -07:00
commit 5e823b5a25
2 changed files with 3 additions and 4 deletions

View file

@ -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;
}

View file

@ -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 =