From 26be68ae9823b7a078c8251f70038d98961388bc Mon Sep 17 00:00:00 2001 From: yexo Date: Sat, 3 Jul 2010 21:43:44 +0000 Subject: (svn r20070) -Feature: when none of the open windows handles a keypress, try all toolbars for global hotkeys Users that have run a version between r20056 and r20068 should delete their hotkeys.cfg to reset the terraform toolbar hotkeys to default --- src/window.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/window.cpp') diff --git a/src/window.cpp b/src/window.cpp index f15293ea3..2379f173b 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -32,6 +32,7 @@ #include "strings_func.h" #include "settings_type.h" #include "newgrf_debug.h" +#include "hotkeys.h" #include "table/sprites.h" @@ -1955,7 +1956,9 @@ void HandleKeypress(uint32 raw_key) w = FindWindowById(WC_MAIN_TOOLBAR, 0); /* When there is no toolbar w is null, check for that */ - if (w != NULL) w->OnKeyPress(key, keycode); + if (w != NULL && w->OnKeyPress(key, keycode) == ES_HANDLED) return; + + HandleGlobalHotkeys(key, keycode); } /** -- cgit v1.2.3-54-g00ecf