1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 23:15:07 +00:00

LibWeb: Add Page context menu request

Pages can request a context menu on right click. This is plumbed
through the PageClient.
This commit is contained in:
Andrew Kaster 2020-06-27 14:21:58 -06:00 committed by Andreas Kling
parent d28a824d4c
commit cc675cbe24
4 changed files with 12 additions and 0 deletions

View file

@ -150,6 +150,9 @@ bool EventHandler::handle_mousedown(const Gfx::IntPoint& position, unsigned butt
dump_selection("MouseDown");
m_in_mouse_selection = true;
}
else if (button == GUI::MouseButton::Right) {
page_client.page_did_request_context_menu(m_frame.to_main_frame_position(position));
}
}
return true;
}