diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-03-27 13:08:20 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-03-28 19:39:52 +0530 |
| commit | 46a7fee95a010f20490d7f66f0c2c82ed936ca5e (patch) | |
| tree | 9afcbacfb0cdc22f44fb1c61f196347a391e5bd5 /src/InputMediator.cpp | |
| parent | a54f6ae81b54ca59bf913bba16f271a35ca08d9d (diff) | |
| download | null-browser-46a7fee95a010f20490d7f66f0c2c82ed936ca5e.tar.gz null-browser-46a7fee95a010f20490d7f66f0c2c82ed936ca5e.zip | |
Refactor and fix tab id use for focus/close
Diffstat (limited to 'src/InputMediator.cpp')
| -rw-r--r-- | src/InputMediator.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/InputMediator.cpp b/src/InputMediator.cpp index 91393c2..175a1b4 100644 --- a/src/InputMediator.cpp +++ b/src/InputMediator.cpp @@ -13,19 +13,22 @@ InputMediator::InputMediator(WebViewStack *webview_stack, KeymapEvaluator *keymap_evaluator) : webview_stack(webview_stack), lua_runtime(lua_runtime), keymap_evaluator(keymap_evaluator) { - connect(lua_runtime, &LuaRuntime::url_opened, webview_stack, - &WebViewStack::open_url); connect(lua_runtime, &LuaRuntime::keymap_added, this, &InputMediator::add_keymap); + connect(lua_runtime, &LuaRuntime::history_back_requested, webview_stack, &WebViewStack::webview_history_back); connect(lua_runtime, &LuaRuntime::history_forward_requested, webview_stack, &WebViewStack::webview_history_forward); + + connect(lua_runtime, &LuaRuntime::url_opened, webview_stack, + &WebViewStack::open_url); connect(lua_runtime, &LuaRuntime::webview_closed, webview_stack, &WebViewStack::close); connect(lua_runtime, &LuaRuntime::webview_selected, webview_stack, &WebViewStack::focus_webview); + // TODO: Think of how to handle this for multi-window lua_runtime->set_current_tab_id_fetcher( [this]() { return this->webview_stack->current_webview_id(); }); lua_runtime->set_webview_data_list_fetcher( |
