mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
Ladybird: Send the double click event to WebContent
This commit is contained in:
parent
e2b1f9447c
commit
3894a8b995
2 changed files with 16 additions and 0 deletions
|
@ -314,6 +314,21 @@ void WebContentView::mouseReleaseEvent(QMouseEvent* event)
|
|||
client().async_mouse_up(to_content(position), button, buttons, modifiers);
|
||||
}
|
||||
|
||||
void WebContentView::mouseDoubleClickEvent(QMouseEvent* event)
|
||||
{
|
||||
Gfx::IntPoint position(event->position().x() / m_inverse_pixel_scaling_ratio, event->position().y() / m_inverse_pixel_scaling_ratio);
|
||||
auto button = get_button_from_qt_event(*event);
|
||||
if (button == 0) {
|
||||
// We could not convert Qt buttons to something that Lagom can
|
||||
// recognize - don't even bother propagating this to the web engine
|
||||
// as it will not handle it anyway, and it will (currently) assert
|
||||
return;
|
||||
}
|
||||
auto modifiers = get_modifiers_from_qt_mouse_event(*event);
|
||||
auto buttons = get_buttons_from_qt_event(*event);
|
||||
client().async_doubleclick(to_content(position), button, buttons, modifiers);
|
||||
}
|
||||
|
||||
void WebContentView::dragEnterEvent(QDragEnterEvent* event)
|
||||
{
|
||||
if (event->mimeData()->hasUrls())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue