~emersion/public-inbox

[PATCH wayland-clipboard-drag-and-drop] Request for feedback

Karl
Details
Message ID
<C96YYF9Z4PVB.3SRHXX1H8JKQJ@archAsus>
DKIM signature
pass
Download raw message
Hello :wave:


I used your blog about the wayland drag and drop support to port a
header library to wayland. And it helped for most of my needs, so first
and foremost thank you for taking your time to do that work.

Now I think that this blog post is one of the few detailed resources
there is on how to configure wayland for clipboard support, I wanted to
tell you that I found an issues with the code:

The `wl_data_offer_accept()` call needs to be moved from
`data_device_handle_drop` to `data_offer_handle_offer` for the specific
mime_type and with a serial:
`wl_data_offer_accept(current_drag_offer, serial, mime_type);`

Otherwise the wayland compositor will never dispatch the `drop` event
and the client can thus never access the data. This took me longer than
I care to admit to figure this out.

Sorry for being a bit verbose, I would have supplied a patch, but I
don't think your blog posts are in a public repo, are they? Thank you
for your consideration, though. :)


Much love :v:
Reply to thread Export thread (mbox)