reset current window after processing sequence

This commit is contained in:
Yuxin Wu 2022-12-30 22:54:41 -08:00
parent 1c10c5fcc4
commit 13b09346b9

View File

@ -172,6 +172,9 @@ on_key_input(GLFWkeyevent *ev) {
PyObject *ret = PyObject_CallMethod(
global_state.boss, "process_sequence", "O", ke);
Py_CLEAR(ke);
// the shortcut could have created a new window or closed the
// window, rendering the pointer no longer valid
w = window_for_window_id(active_window_id);
if (ret == NULL) { PyErr_Print(); }
else {
bool consumed = ret == Py_True;