Browser: Close tabs when middle clicked

This commit is contained in:
FalseHonesty 2020-05-06 23:04:32 -04:00 committed by Andreas Kling
parent bb6258229a
commit 60024ab574
Notes: sideshowbarker 2024-07-19 06:47:05 +09:00

View file

@ -111,6 +111,11 @@ int main(int argc, char** argv)
tab.did_become_active();
};
tab_widget.on_middle_click = [&](auto& clicked_widget) {
auto& tab = static_cast<Browser::Tab&>(clicked_widget);
tab.on_tab_close_request(tab);
};
Browser::WindowActions window_actions(*window);
Function<void(URL url, bool activate)> create_new_tab;