X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin3_src%2FWM%2Frenderers%2Fwidget%2Ftextinput.c;h=de862bfe402efd0037fa21126e472e59343cc9f3;hb=4e407e69bd660e9a32644281733192193ee6e8c8;hp=fc7e10775b3b2a6fc349588e45fcc1540310d3d9;hpb=6a99a6d70179161964d47de9a825fd61e8445b86;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin3_src/WM/renderers/widget/textinput.c b/Usermode/Applications/axwin3_src/WM/renderers/widget/textinput.c index fc7e1077..de862bfe 100644 --- a/Usermode/Applications/axwin3_src/WM/renderers/widget/textinput.c +++ b/Usermode/Applications/axwin3_src/WM/renderers/widget/textinput.c @@ -117,6 +117,8 @@ void Widget_TextInput_Init(tElement *Element) info = Element->Data = malloc(sizeof(*info)); info->DrawOfs = 0; info->CursorXOfs = 0; + info->CursorByteOfs = 0; + info->Length = 0; // No need to explicitly update parent min dims, as the AddElement routine does that } @@ -213,12 +215,12 @@ int Widget_TextInput_KeyFire(tElement *Element, int KeySym, int Character) } // TODO: Have a Widget_ function to do this instead - WM_Invalidate(Element->Window); + WM_Invalidate(Element->Window, 1); return 0; } -DEFWIDGETTYPE(ELETYPE_TEXTINPUT, +DEFWIDGETTYPE(ELETYPE_TEXTINPUT, "TextInput", WIDGETTYPE_FLAG_NOCHILDREN, .Render = Widget_TextInput_Render, .Init = Widget_TextInput_Init,