1
0
Fork 0

(svn r13310) -Fix: invalidate OSK when parent editbox changes (from keyboard)

release/0.7
smatz 2008-05-28 15:28:27 +00:00
parent 17ccd5ec65
commit f7233786d2
2 changed files with 10 additions and 0 deletions

View File

@ -1083,6 +1083,11 @@ struct QueryStringWindow : public QueryStringBaseWindow
{ {
EventState state; EventState state;
switch (this->HandleEditBoxKey(QUERY_STR_WIDGET_TEXT, key, keycode, state)) { switch (this->HandleEditBoxKey(QUERY_STR_WIDGET_TEXT, key, keycode, state)) {
default: NOT_REACHED();
case 0: {
Window *osk = FindWindowById(WC_OSK, 0);
if (osk != NULL && osk->parent == this) osk->OnInvalidateData();
} break;
case 1: this->OnOk(); // Enter pressed, confirms change case 1: this->OnOk(); // Enter pressed, confirms change
/* FALL THROUGH */ /* FALL THROUGH */
case 2: delete this; break; // ESC pressed, closes window, abandons changes case 2: delete this; break; // ESC pressed, closes window, abandons changes

View File

@ -203,6 +203,11 @@ struct OskWindow : public Window {
/* make the caret of the parent window also blink */ /* make the caret of the parent window also blink */
this->parent->InvalidateWidget(this->text_btn); this->parent->InvalidateWidget(this->text_btn);
} }
virtual void OnInvalidateData(int)
{
this->InvalidateWidget(OSK_WIDGET_TEXT);
}
}; };
static const Widget _osk_widgets[] = { static const Widget _osk_widgets[] = {