From 47c2a74d7447a2530e91de36d49cf7371a4f4108 Mon Sep 17 00:00:00 2001 From: IoI_xD Date: Thu, 23 Apr 2026 14:50:11 -0700 Subject: [PATCH] combobox should close when the parent window is resized --- src/widget/combobox.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/widget/combobox.c b/src/widget/combobox.c index dd037e9..d650dad 100644 --- a/src/widget/combobox.c +++ b/src/widget/combobox.c @@ -183,12 +183,19 @@ static void func_handler(MwWidget handle, const char* name, void* out, va_list v } } +static void parent_resize(MwWidget handle) { + MwComboBox cb = handle->internal; + if(cb->opened) { + click(handle); + } +} + MwClassRec MwComboBoxClassRec = { wcreate, /* create */ destroy, /* destroy */ draw, /* draw */ click, /* click */ - NULL, /* parent_resize */ + parent_resize, /* parent_resize */ prop_change, /* prop_change */ NULL, /* mouse_move */ MwForceRender2, /* mouse_up */