From 4f2ef499eaa527d23d72e7b975a28a0e7b1f5c57 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 17 Apr 2024 10:31:33 -0500 Subject: [PATCH] fix(core): update core to handle reset context - clear the app context as well as the cached context Fixes: #10955 --- core/src/km_core_processevent_api.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/km_core_processevent_api.cpp b/core/src/km_core_processevent_api.cpp index 451c93604a..a2bca95ea8 100644 --- a/core/src/km_core_processevent_api.cpp +++ b/core/src/km_core_processevent_api.cpp @@ -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();