Merge remote-tracking branch 'upstream/master'

This commit is contained in:
dP
2021-09-27 19:53:01 +03:00
173 changed files with 31132 additions and 9502 deletions

View File

@@ -2593,6 +2593,22 @@ EventState Window::HandleEditBoxKey(int wid, WChar key, uint16 keycode)
return ES_HANDLED;
}
/**
* Handle Toolbar hotkey events - can come from a source like the MacBook Touch Bar.
* @param hotkey Hotkey code
*/
void HandleToolbarHotkey(int hotkey)
{
assert(HasModalProgress() || IsLocalCompany());
Window *w = FindWindowById(WC_MAIN_TOOLBAR, 0);
if (w != nullptr) {
if (w->window_desc->hotkeys != nullptr) {
if (hotkey >= 0 && w->OnHotkey(hotkey) == ES_HANDLED) return;
}
}
}
/**
* Handle keyboard input.
* @param keycode Virtual keycode of the key.