mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-28 13:43:45 +03:00
LibWeb: Dispatch dblclick
UI Events on double click
This commit is contained in:
parent
03cda8a013
commit
237a5bedd2
Notes:
sideshowbarker
2024-07-17 17:49:11 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/237a5bedd2 Pull-request: https://github.com/SerenityOS/serenity/pull/14277 Reviewed-by: https://github.com/AtkinsSJ
@ -542,7 +542,8 @@ bool EventHandler::handle_doubleclick(Gfx::IntPoint const& position, unsigned bu
|
||||
if (!node || !layout_node)
|
||||
return false;
|
||||
|
||||
// FIXME: Dispatch 'dblclick' events.
|
||||
auto offset = compute_mouse_event_offset(position, *layout_node);
|
||||
node->dispatch_event(UIEvents::MouseEvent::create_from_platform_event(UIEvents::EventNames::dblclick, offset.x(), offset.y(), position.x(), position.y(), button));
|
||||
|
||||
// FIXME: Select word
|
||||
|
||||
|
@ -15,6 +15,7 @@ namespace Web::UIEvents::EventNames {
|
||||
|
||||
#define ENUMERATE_UI_EVENTS \
|
||||
__ENUMERATE_UI_EVENT(click) \
|
||||
__ENUMERATE_UI_EVENT(dblclick) \
|
||||
__ENUMERATE_UI_EVENT(keydown) \
|
||||
__ENUMERATE_UI_EVENT(keyup) \
|
||||
__ENUMERATE_UI_EVENT(mousedown) \
|
||||
|
Loading…
Reference in New Issue
Block a user