(svn r24733) -Codechange: Move handling of editbox keys to window class.

This commit is contained in:
frosch
2012-11-13 21:47:02 +00:00
parent 7699a7dc06
commit c4d7c8dd42
13 changed files with 34 additions and 94 deletions

View File

@@ -2263,8 +2263,13 @@ void HandleKeypress(uint32 raw_key)
/* Check if the focused window has a focused editbox */
if (EditBoxInGlobalFocus()) {
/* All input will in this case go to the focused window */
if (_focused_window->OnKeyPress(key, keycode) == ES_HANDLED) return;
/* All input will in this case go to the focused editbox */
if (_focused_window->window_class == WC_CONSOLE) {
if (_focused_window->OnKeyPress(key, keycode) == ES_HANDLED) return;
} else {
QueryStringBaseWindow *query = dynamic_cast<QueryStringBaseWindow*>(_focused_window);
if (query != NULL && query->HandleEditBoxKey(_focused_window->nested_focus->index, key, keycode) == ES_HANDLED) return;
}
}
/* Call the event, start with the uppermost window, but ignore the toolbar. */