From 60024ab574e506f924515fec18591313c556fbb4 Mon Sep 17 00:00:00 2001 From: FalseHonesty Date: Wed, 6 May 2020 23:04:32 -0400 Subject: [PATCH] Browser: Close tabs when middle clicked --- Applications/Browser/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Applications/Browser/main.cpp b/Applications/Browser/main.cpp index f3d9ca24b9a..9b4dc60e009 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(clicked_widget); + tab.on_tab_close_request(tab); + }; + Browser::WindowActions window_actions(*window); Function create_new_tab;