mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
Browser: Close tabs when middle clicked
This commit is contained in:
parent
bb6258229a
commit
60024ab574
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue