Update library/Core.cpp

Co-authored-by: Myk <myk.taylor@gmail.com>
develop
Rob Goodberry 2023-02-05 19:07:49 -05:00 committed by GitHub
parent a3c03a83ad
commit 443fe5d813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 7 deletions

@ -2420,13 +2420,8 @@ bool Core::SelectHotkey(int sym, int modifiers)
continue; continue;
} }
if (!binding.focus.empty()) { if (!binding.focus.empty()) {
bool found = false; if (!Gui::matchFocusString(binding.focus)) {
std::vector<std::string> focusStrings = Gui::getCurFocus(true); std::vector<std::string> focusStrings = Gui::getCurFocus(true);
if(Gui::matchFocusString(binding.focus)) {
found = true;
}
if (!found) {
DEBUG(keybinding).print("skipping keybinding due to focus string mismatch: '%s' !~ '%s'\n", DEBUG(keybinding).print("skipping keybinding due to focus string mismatch: '%s' !~ '%s'\n",
join_strings(", ", focusStrings).c_str(), binding.focus.c_str()); join_strings(", ", focusStrings).c_str(), binding.focus.c_str());
continue; continue;