summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-13 16:41:34 +0000
committerrubidium <rubidium@openttd.org>2009-07-13 16:41:34 +0000
commit463b96a746a74830c49fcc0b84be0df125c7e469 (patch)
treeda0aa902f8570a0615ec99dc0ee5e8a54772bd75 /src/window.cpp
parentb6960e4e17c9d9464041d8c04907a5e1caf5c609 (diff)
downloadopenttd-463b96a746a74830c49fcc0b84be0df125c7e469.tar.xz
(svn r16815) -Fix: reduce the toolbar's priority for handling keypresses from most important to least important, so e.g. the order windows' 'd' skips to the next order
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/window.cpp b/src/window.cpp
index f46bf08da..ba360beea 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1992,9 +1992,10 @@ void HandleKeypress(uint32 raw_key)
if (_focused_window->OnKeyPress(key, keycode) == Window::ES_HANDLED) return;
}
- /* Call the event, start with the uppermost window. */
+ /* Call the event, start with the uppermost window, but ignore the toolbar. */
Window *w;
FOR_ALL_WINDOWS_FROM_FRONT(w) {
+ if (w->window_class == WC_MAIN_TOOLBAR) continue;
if (w->OnKeyPress(key, keycode) == Window::ES_HANDLED) return;
}