wayland: remove our widget from parent's currently held widgets on destroy
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoIxD 2026-09-21 11:40:51 -07:00
commit 4cb88fdc05

View file

@ -986,6 +986,9 @@ static void MwLLDestroyImpl(MwLL handle) {
int i;
struct timeval tv;
int select_ret;
MwLL topmost_parent = handle;
while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent;
event_loop(handle);
// wl_display_cancel_read(handle->wayland.display);
@ -1025,6 +1028,12 @@ static void MwLLDestroyImpl(MwLL handle) {
printf("widget invalid\n");
}
for(i = 0; i < arrlen(topmost_parent->wayland.currentlyHeldWidgets); i++) {
if(topmost_parent->wayland.currentlyHeldWidgets[i] == handle) {
arrdel(topmost_parent->wayland.currentlyHeldWidgets, i);
}
}
// pthread_mutex_destroy(&handle->wayland.eventsMutex);
free(handle);