-
Notifications
You must be signed in to change notification settings - Fork 265
Open
Description
Dropping a JPEG onto Blender 5.0 fails with the cosmic desktop.
This looks to be caused by Blender calling wl_data_offer_accept on all mime types, even those which aren't supported by the offer.
Even though this can be resolved on Blender's side, there is nothing in the spec which requires accept only be called with supported mime types,
so as far as I can tell this is a bug in Smithay.
I think the accept logic should be changed so any acceptable mime type causes accept to be true, instead of the last mime type setting the "accepted" value.
e.g.
src/wayland/selection/data_device/mod.rs
Request::Accept { mime_type, .. } => {
if let Some(source) = source.as_ref() {
if let Some(mtype) = mime_type {
// Only set accepted when the mime type matches what the
// source offers. Non-matching types are ignored so they
// do not override a previous valid match.
if !data.accepted
&& source
.metadata()
.is_some_and(|meta| meta.mime_types.contains(&mtype))
{
data.accepted = true;
}
} else {
data.accepted = false;
}
} else if data.finished {
offer.post_error(
wl_data_offer::Error::InvalidFinish,
"Accept request after Finish.",
);
}
}
With accepted: false, as the default in the enter handler.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels