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
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
b1a2d4d549
commit
4cb88fdc05
1 changed files with 9 additions and 0 deletions
|
|
@ -986,6 +986,9 @@ static void MwLLDestroyImpl(MwLL handle) {
|
||||||
int i;
|
int i;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
int select_ret;
|
int select_ret;
|
||||||
|
MwLL topmost_parent = handle;
|
||||||
|
|
||||||
|
while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent;
|
||||||
|
|
||||||
event_loop(handle);
|
event_loop(handle);
|
||||||
// wl_display_cancel_read(handle->wayland.display);
|
// wl_display_cancel_read(handle->wayland.display);
|
||||||
|
|
@ -1025,6 +1028,12 @@ static void MwLLDestroyImpl(MwLL handle) {
|
||||||
printf("widget invalid\n");
|
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);
|
// pthread_mutex_destroy(&handle->wayland.eventsMutex);
|
||||||
|
|
||||||
free(handle);
|
free(handle);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue