diff options
author | FalseHonesty <thefalsehonesty@gmail.com> | 2020-05-06 23:04:32 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-09 23:54:20 +0200 |
commit | 60024ab574e506f924515fec18591313c556fbb4 (patch) | |
tree | 7805691cf2fdbc7bb8845f4bcd1b37b61fec9dc5 /Applications/Browser | |
parent | bb6258229a0192b86ef68f3c7e2a7d135783a7de (diff) | |
download | serenity-60024ab574e506f924515fec18591313c556fbb4.zip |
Browser: Close tabs when middle clicked
Diffstat (limited to 'Applications/Browser')
-rw-r--r-- | Applications/Browser/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Applications/Browser/main.cpp b/Applications/Browser/main.cpp index f3d9ca24b9..9b4dc60e00 100644 --- a/Applications/Browser/main.cpp +++ b/Applications/Browser/main.cpp @@ -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; |