mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibGUI+WindowServer: Make DragOperation hold a MimeData instance
...instead of maybe bitmap + a single mime type and its corresponding data. This allows drag&drop operations to hold multiple different kinds of data, and the views/applications to choose between those. For instance, Spreadsheet can keep the structure of the dragged cells, and still provide text-only data to be passed to different unrelated editors.
This commit is contained in:
parent
c930e02624
commit
6d1e47e7dd
Notes:
sideshowbarker
2024-07-19 01:30:00 +09:00
Author: https://github.com/alimpfard
Commit: 6d1e47e7dd
Pull-request: https://github.com/SerenityOS/serenity/pull/3984
Issue: https://github.com/SerenityOS/serenity/issues/3906
Reviewed-by: https://github.com/awesomekling
15 changed files with 98 additions and 59 deletions
|
@ -755,7 +755,7 @@ OwnPtr<Messages::WindowServer::StartDragResponse> ClientConnection::handle(const
|
|||
bitmap = Gfx::Bitmap::create_with_shared_buffer(Gfx::BitmapFormat::RGBA32, *shared_buffer, message.bitmap_size());
|
||||
}
|
||||
|
||||
wm.start_dnd_drag(*this, message.text(), bitmap, message.data_type(), message.data());
|
||||
wm.start_dnd_drag(*this, message.text(), bitmap, Core::MimeData::construct(message.mime_data()));
|
||||
return make<Messages::WindowServer::StartDragResponse>(true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue