mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 21:35:06 +00:00
WindowServer+LibGUI: Add data_type and data fields to drag operations
These fields are intended to carry the real meat of a drag operation, and the "text" is just for what we show on screen (alongside the cursor during the actual drag.) The data field is just a String for now, but in the future we should make it something more flexible.
This commit is contained in:
parent
af7cb7ce1b
commit
cfcb38dff1
13 changed files with 50 additions and 15 deletions
|
@ -266,7 +266,7 @@ void GWindowServerConnection::handle(const WindowClient::AsyncSetWallpaperFinish
|
|||
void GWindowServerConnection::handle(const WindowClient::DragDropped& message)
|
||||
{
|
||||
if (auto* window = GWindow::from_window_id(message.window_id()))
|
||||
CEventLoop::current().post_event(*window, make<GDropEvent>(message.mouse_position(), message.text()));
|
||||
CEventLoop::current().post_event(*window, make<GDropEvent>(message.mouse_position(), message.text(), message.data_type(), message.data()));
|
||||
}
|
||||
|
||||
void GWindowServerConnection::handle(const WindowClient::DragAccepted&)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue