fix(ui): event initialization should clear uninitialized mouse data

Synthetic click events only set target/type/data, leaving mouse coordinates uninitialized. Zero the event before assigning fields so hit testing does not read undefined values.
This commit is contained in:
Liu
2026-11-19 22:03:59 +08:00
parent 1ae26cab65
commit ac011085ec
+1
View File
@@ -218,6 +218,7 @@ int ui_get_event_id(const char *event_name)
void ui_event_init(ui_event_t *e, const char *name)
{
memset(e, 0, sizeof(*e));
e->target = NULL;
e->type = ui_use_widget_event_id(name);
e->cancel_bubble = false;