LibWeb: Add hook when a link is middle clicked

This commit is contained in:
FalseHonesty 2020-05-06 15:33:01 -04:00 committed by Andreas Kling
commit 0e048f3c4c
Notes: sideshowbarker 2024-07-19 06:55:39 +09:00
2 changed files with 4 additions and 0 deletions

View file

@ -244,6 +244,9 @@ void HtmlView::mousedown_event(GUI::MouseEvent& event)
} else if (event.button() == GUI::MouseButton::Right) {
if (on_link_context_menu_request)
on_link_context_menu_request(link->href(), event.position().translated(screen_relative_rect().location()));
} else if (event.button() == GUI::MouseButton::Middle) {
if (on_link_middle_click)
on_link_middle_click(link->href());
}
} else {
if (event.button() == GUI::MouseButton::Left) {