From 71cc9f101122d9864e7078c72704b89ae8b4f00b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 15 Dec 2016 09:46:10 +0000 Subject: [PATCH] Fix reentrancy in InputeModes::Normal::on_key --- src/input_handler.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/input_handler.cc b/src/input_handler.cc index e9c6542d..2a6a8b68 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -196,8 +196,8 @@ public: void on_key(Key key) override { - m_in_on_key = true; - auto unset_in_on_key = on_scope_end([this]{ m_in_on_key = false; }); + m_in_on_key.set(); + auto unset_in_on_key = on_scope_end([this]{ m_in_on_key.unset(); }); bool do_restore_hooks = false; auto restore_hooks = on_scope_end([&, this]{ @@ -301,7 +301,7 @@ private: NormalParams m_params = { 0, 0 }; bool m_hooks_disabled = false; bool m_enabled = false; - bool m_in_on_key = false; + NestedBool m_in_on_key; Timer m_idle_timer; Timer m_fs_check_timer; MouseHandler m_mouse_handler;