From f7df6df342f5e8848b6fe5a1373319d4f5e3ebb0 Mon Sep 17 00:00:00 2001 From: Nishi Date: Sat, 23 May 2026 03:49:47 +0900 Subject: [PATCH] better fix --- src/core.c | 9 ++++++--- src/widget/listbox.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/core.c b/src/core.c index 99b8d8b..5ae133a 100644 --- a/src/core.c +++ b/src/core.c @@ -576,10 +576,11 @@ void MwSetInteger(MwWidget handle, const char* key, int n) { arrput(keys, NULL); MwDispatch3(handle, props_change, keys); arrfree(keys); + + MwDispatch3(handle, prop_change, key); } if(handle->parent != NULL && handle->parent->prop_event) { - MwDispatch3(handle, prop_change, key); if(handle->parent != NULL) MwDispatch4(handle->parent, children_prop_change, handle, key); } @@ -624,10 +625,11 @@ void MwSetText(MwWidget handle, const char* key, const char* value) { arrput(keys, NULL); MwDispatch3(handle, props_change, keys); arrfree(keys); + + MwDispatch3(handle, prop_change, key); } if(handle->parent != NULL && handle->parent->prop_event) { - MwDispatch3(handle, prop_change, key); if(handle->parent != NULL) MwDispatch4(handle->parent, children_prop_change, handle, key); } @@ -655,10 +657,11 @@ void MwSetVoid(MwWidget handle, const char* key, void* value) { arrput(keys, NULL); MwDispatch3(handle, props_change, keys); arrfree(keys); + + MwDispatch3(handle, prop_change, key); } if(handle->parent != NULL && handle->parent->prop_event) { - MwDispatch3(handle, prop_change, key); if(handle->parent != NULL) MwDispatch4(handle->parent, children_prop_change, handle, key); } } diff --git a/src/widget/listbox.c b/src/widget/listbox.c index bc82f08..32be887 100644 --- a/src/widget/listbox.c +++ b/src/widget/listbox.c @@ -401,7 +401,7 @@ static void draw(MwWidget handle) { static void prop_change(MwWidget handle, const char* prop) { MwListBox lb = handle->internal; - if(strcmp(prop, MwNleftPadding) == 0 && lb->frame != NULL) { + if(strcmp(prop, MwNleftPadding) == 0) { MwForceRender(lb->frame); } if(strcmp(prop, MwNhasHeading) == 0) {