diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-05-09 13:48:48 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-05-09 13:48:48 +0100 |
| commit | d3aff03062a344f8ec0387d7c514747ee97fc69b (patch) | |
| tree | ae23d25579c463378ffe4624ac0233e5ccbae767 /src/window.cc | |
| parent | 3338ba5c6c19590794f678dd9c47c49b8391f34f (diff) | |
Keep a pointer to current client in windows so that window hooks can access it
Diffstat (limited to 'src/window.cc')
| -rw-r--r-- | src/window.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/window.cc b/src/window.cc index 6dea389c..0e7c3b96 100644 --- a/src/window.cc +++ b/src/window.cc @@ -377,6 +377,9 @@ void Window::run_hook_in_own_context(StringView hook_name, StringView param) { InputHandler hook_handler({ *m_buffer, Selection{} }, Context::Flags::Transient); hook_handler.context().set_window(*this); + if (m_client) + hook_handler.context().set_client(*m_client); + hooks().run_hook(hook_name, param, hook_handler.context()); } } |
