mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 18:02:20 +00:00
UI/AppKit: Process drag-and-drop events through the web view
This forwards all drag-and-drop events from the UI to the WebContent process. If the page accepts the events, the UI does not handle them. Otherwise, we will open the dropped files as file:// URLs.
This commit is contained in:
parent
948b6de3b1
commit
ac062d0c97
Notes:
github-actions[bot]
2024-08-19 11:30:14 +00:00
Author: https://github.com/trflynn89
Commit: ac062d0c97
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1111
5 changed files with 138 additions and 3 deletions
|
@ -93,6 +93,13 @@ void WebViewBridge::enqueue_input_event(Web::MouseEvent event)
|
|||
ViewImplementation::enqueue_input_event(move(event));
|
||||
}
|
||||
|
||||
void WebViewBridge::enqueue_input_event(Web::DragEvent event)
|
||||
{
|
||||
event.position = to_content_position(event.position.to_type<int>()).to_type<Web::DevicePixels>();
|
||||
event.screen_position = to_content_position(event.screen_position.to_type<int>()).to_type<Web::DevicePixels>();
|
||||
ViewImplementation::enqueue_input_event(move(event));
|
||||
}
|
||||
|
||||
void WebViewBridge::enqueue_input_event(Web::KeyEvent event)
|
||||
{
|
||||
ViewImplementation::enqueue_input_event(move(event));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue