From 3471d795c9f709cc6c1140a6e7c8381ca84429a7 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 6 Nov 2012 13:37:18 +0100 Subject: [PATCH] ClientManager: tweak on input event lambda --- src/client_manager.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client_manager.cc b/src/client_manager.cc index 3fbdcaeb..a265187a 100644 --- a/src/client_manager.cc +++ b/src/client_manager.cc @@ -12,7 +12,7 @@ void ClientManager::create_client(std::unique_ptr&& ui, InputHandler* input_handler = m_clients.back().input_handler.get(); Context* context = m_clients.back().context.get(); - EventManager::instance().watch(event_fd, [=](int) { + EventManager::instance().watch(event_fd, [input_handler, context, this](int fd) { try { input_handler->handle_available_inputs(*context); @@ -24,8 +24,8 @@ void ClientManager::create_client(std::unique_ptr&& ui, } catch (Kakoune::client_removed&) { - EventManager::instance().unwatch(event_fd); - close(event_fd); + EventManager::instance().unwatch(fd); + close(fd); } ClientManager::instance().redraw_clients(); });