1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-24 06:59:10 +00:00

(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

This commit is contained in:
rubidium
2009-07-13 16:41:34 +00:00
parent b6960e4e17
commit 463b96a746

View File

@@ -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;
}