mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
Browser: Close tabs when middle clicked
This commit is contained in:
parent
bb6258229a
commit
60024ab574
Notes:
sideshowbarker
2024-07-19 06:47:05 +09:00
Author: https://github.com/FalseHonesty Commit: https://github.com/SerenityOS/serenity/commit/60024ab574e Pull-request: https://github.com/SerenityOS/serenity/pull/2141
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…
Reference in a new issue