mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-10 03:13:28 +00:00
make destroyed 1 on child widgets too
This commit is contained in:
@@ -210,7 +210,7 @@ if (param_get("static")) {
|
||||
}
|
||||
|
||||
foreach my $l (@library_targets) {
|
||||
my $warn = "-Wall -Wextra -Wno-sign-compare";
|
||||
my $warn = "-Wall -Wextra -Wno-sign-compare -Wno-unused-value";
|
||||
my $s = $l;
|
||||
my $o = $object_suffix;
|
||||
$o =~ s/\./\\\./g;
|
||||
|
||||
@@ -238,6 +238,14 @@ static void MwFreeWidget(MwWidget handle) {
|
||||
free(handle);
|
||||
}
|
||||
|
||||
static void destroy_children(MwWidget handle) {
|
||||
int i;
|
||||
for(i = 0; i < arrlen(handle->children); i++) {
|
||||
destroy_children(handle->children[i]);
|
||||
}
|
||||
handle->destroyed = 1;
|
||||
}
|
||||
|
||||
void MwDestroyWidget(MwWidget handle) {
|
||||
if(handle->parent != NULL) {
|
||||
int i;
|
||||
@@ -248,6 +256,7 @@ void MwDestroyWidget(MwWidget handle) {
|
||||
arrput(handle->parent->destroy_queue, handle);
|
||||
}
|
||||
}
|
||||
destroy_children(handle);
|
||||
handle->destroyed = 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user