fix(core): update core to handle reset context

- clear the app context as well as the cached context

Fixes: #10955
This commit is contained in:
Steven R. Loomis 2024-04-17 10:31:33 -05:00
parent 5c0459928c
commit 4f2ef499ea

View file

@ -53,7 +53,10 @@ km_core_process_event(km_core_state *state,
km_core_status status = state->processor().process_event(state, vk, modifier_state, is_key_down, event_flags);
if (state_should_invalidate_context(state, vk, modifier_state, is_key_down, event_flags)) {
// clear the context and the app context
state->context().clear();
state->app_context().clear();
// we are already committed. So we need to un-commit (remove the end of the vector)
if (state->actions().back().type == KM_CORE_IT_END) {
state->actions().pop_back();