From 936b95ac34b99248c61f0502f53094e1244e5943 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 6 Dec 2017 12:59:31 +0800 Subject: [PATCH] Ensure that normal mode restores disabled hook status on disabled Fixes #1744 --- src/input_handler.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/input_handler.cc b/src/input_handler.cc index a682215e..da738706 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -194,11 +194,17 @@ public: context().hooks().run_hook("NormalBegin", "", context()); } - void on_disabled(bool) override + void on_disabled(bool temporary) override { m_idle_timer.set_next_date(TimePoint::max()); m_fs_check_timer.set_next_date(TimePoint::max()); + if (not temporary and m_hooks_disabled) + { + context().hooks_disabled().unset(); + m_hooks_disabled = false; + } + context().hooks().run_hook("NormalEnd", "", context()); }