diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-12-12 23:51:51 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-12-12 23:51:51 +0000 |
| commit | 515231e824f730fb58db41526196a56f0adb57ed (patch) | |
| tree | 98c555a48e352e4f865d1b79a5eae9259c0a883e /src/input_handler.hh | |
| parent | 80b1d88bb07b81f44aac2cb2e9d9fcd739340463 (diff) | |
Fix input mode keep alive handling, use a refcount for input modes
Fixes #528
Diffstat (limited to 'src/input_handler.hh')
| -rw-r--r-- | src/input_handler.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input_handler.hh b/src/input_handler.hh index c67c8399..e29114ab 100644 --- a/src/input_handler.hh +++ b/src/input_handler.hh @@ -87,12 +87,12 @@ private: Context m_context; friend class InputMode; - Vector<std::unique_ptr<InputMode>> m_mode_stack; + Vector<RefPtr<InputMode>> m_mode_stack; InputMode& current_mode() const { return *m_mode_stack.back(); } void push_mode(InputMode* new_mode); - std::unique_ptr<InputMode> pop_mode(InputMode* current_mode); + void pop_mode(InputMode* current_mode); struct Insertion{ InsertMode mode; Vector<Key> keys; bool disable_hooks; }; Insertion m_last_insert = { InsertMode::Insert, {}, false }; |
