mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 02:26:10 +00:00
LibVT: Accept supported drag enter events
This commit is contained in:
parent
f1aa03b779
commit
1d9ec8bd56
Notes:
sideshowbarker
2024-07-17 07:35:25 +09:00
Author: https://github.com/krkk
Commit: 1d9ec8bd56
Pull-request: https://github.com/SerenityOS/serenity/pull/14957
2 changed files with 8 additions and 0 deletions
|
@ -1115,6 +1115,13 @@ void TerminalWidget::context_menu_event(GUI::ContextMenuEvent& event)
|
|||
}
|
||||
}
|
||||
|
||||
void TerminalWidget::drag_enter_event(GUI::DragEvent& event)
|
||||
{
|
||||
auto const& mime_types = event.mime_types();
|
||||
if (mime_types.contains_slow("text/plain") || mime_types.contains_slow("text/uri-list"))
|
||||
event.accept();
|
||||
}
|
||||
|
||||
void TerminalWidget::drop_event(GUI::DropEvent& event)
|
||||
{
|
||||
if (event.mime_data().has_urls()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue