UI: Disable hotkeys when a user is expected to type text

Disable hotkeys when a user starts an interaction with the UI where they
are expected to type text and re-enable hotkeys when the interaction is
completed.
This commit is contained in:
Ryan Foster 2021-04-15 02:01:05 -04:00 • committed by Jim
commit f832d14220
7 changed files with 24 additions and 0 deletions

View file

@ -297,11 +297,13 @@ void OBSBasicSourceSelect::on_buttonBox_accepted()
obs_sceneitem_release(item);
}
App()->UpdateHotkeyFocusSetting();
done(DialogCode::Accepted);
}
void OBSBasicSourceSelect::on_buttonBox_rejected()
{
App()->UpdateHotkeyFocusSetting();
done(DialogCode::Rejected);
}
@ -376,6 +378,8 @@ OBSBasicSourceSelect::OBSBasicSourceSelect(OBSBasic *parent, const char *id_,
} else {
obs_enum_sources(EnumSources, this);
}
App()->DisableHotkeys();
}
void OBSBasicSourceSelect::SourcePaste(const char *name, bool visible, bool dup)