From 1a3e6f0bc01c68c9c84912277c288818f810aac7 Mon Sep 17 00:00:00 2001 From: IoI_xD Date: Wed, 22 Jul 2026 13:02:10 -0700 Subject: [PATCH] entry widget should initialize t->active and use MwForceRender instead of dispatching draw --- src/widget/entry.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/widget/entry.c b/src/widget/entry.c index 65cd903..dd867d7 100644 --- a/src/widget/entry.c +++ b/src/widget/entry.c @@ -9,6 +9,7 @@ static int wcreate(MwWidget handle) { t->right = 0; t->length = 0; t->cursor_blink_timer = 0; + t->active = 0; handle->internal = t; while(topmost_parent->parent) topmost_parent = topmost_parent->parent; @@ -40,7 +41,7 @@ static void tick(MwWidget handle) { if(++t->cursor_blink_timer >= 30) { t->cursor_blink_timer = 0; } - MwDispatch(handle, draw); + MwForceRender(handle); } } static void draw(MwWidget handle) { @@ -185,7 +186,7 @@ static void mouse_down(MwWidget handle, void* ptr) { MwEntry t = topmost_parent->monitored_entries[i]->internal; t->active = MwFALSE; t->cursor_blink_timer = 0; - MwDispatch(topmost_parent->monitored_entries[i], draw); + MwForceRender(topmost_parent->monitored_entries[i]); } t->active = MwTRUE; MwForceRender2(handle, NULL);