summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/window.cpp b/src/window.cpp
index b7741be30..23db475f4 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -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. */