You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DataDevice helper can be used by itself too. smithay toolkit isn't an all-or-nothing kind of thing; it's perfectly feasible to cherry pick individual helpers.
@WhyNotHugo gnome breaks if you bind multiple data devices(it'll use only one of them), so unless winit has clipboard adding drag and drop is not possible.
Upon further inspection (I was trying to use DataDevice directly in my application) it seems that it's been dropped in sctk-master anyway, so it's best not to rely on it.
I'm not sure what the correct behaviour is when binding to a global twice, but I'm pretty sure it's not something that should be done anyway.
I'm not sure what the correct behaviour is when binding to a global twice, but I'm pretty sure it's not something that should be done anyway.
If something is missing is stck master, it's only because it wasn't ported yet. SCTK had abstractions for dnd and clipboard(it's the same thing) for a long time. We have a PR adding DND already for Wayland, it just breaks clipboard on gnome, because gnome doesn't allow client to bind multiple times to data device.
Data device support is specifically one of the blockers for the next release of sctk. There's a PR for it: Smithay/client-toolkit#301
I'm not sure what the correct behaviour is when binding to a global twice, but I'm pretty sure it's not something that should be done anyway.
Good question. Maybe the Wayland protocol spec could use some clarification on this? Normally binding something multiple times is perfectly fine and works correctly (and may be needed when multiple libraries are making Wayland calls), so without text in the spec about this the Gnome behavior sounds incorrect.
Good question. Maybe the Wayland protocol spec could use some clarification on this? Normally binding something multiple times is perfectly fine and works correctly (and may be needed when multiple libraries are making Wayland calls), so without text in the spec about this the Gnome behavior sounds incorrect.
That works fine on sway for example, it just gnome is special and doesn't bother to fix anything. I bet it still sends modifiers events incorrectly and I have to carry workarounds for gnome to ignore its non-compliance to wayland protocol.
Ah, thanks for pointing out the new DataDevice implementation in sctk, I'd missed it. This seems to bind the data device global only once for both clipboard and drag-and-drop, so should be usable here, right?
This seems to bind the data device global only once for both clipboard and drag-and-drop, so should be usable here, right?
I believe the issue is that winit doesn't currently provide clipboard support (#2156). It looks like toolkits and such in Rust are currently mostly using smithay-clipboard (directly or via a crate that abstracts multiple platforms). But another library like that will bind its own copy of the data device.
So I guess to fix it on the version of Mutter with this issue, it would be necessary to also add clipboard support to winit, and then software updating to the new version of winit would need to update their clipboard support to use winit's implementation. Which for the most part is probably how it should be done anyway.
Though maybe not an issue if it was fixed in Gnome a couple years ago? Not sure what release it made it into of if it was backported. Or if this is any issue in any other compositor.
Depends on the timeline for 0.31. Will the dnd system be reworked in 0.31? If yes, does that mean Wayland support will not come in 0.30 because you prioritize the long term solution?
We are trying to release soon, but Linux/Wayland features missing will not be blocking.
Activity
tfachmann commentedon May 4, 2022
Can we use https://github.com/Smithay/wayland-rs i.e. wayland-client for implementation? Smithay's wayland client toolkit builds on top of it, so it should be a seamless integration.
The
wl_data_device_managermight be what we need to implement drag and drop in wayland: `https://smithay.github.io/wayland-rs/wayland_client/protocol/wl_data_device_manager/index.htmlWhyNotHugo commentedon Feb 14, 2023
The
DataDevicehelper can be used by itself too. smithay toolkit isn't an all-or-nothing kind of thing; it's perfectly feasible to cherry pick individual helpers.kchibisov commentedon Feb 14, 2023
@WhyNotHugo gnome breaks if you bind multiple data devices(it'll use only one of them), so unless winit has clipboard adding drag and drop is not possible.
WhyNotHugo commentedon Feb 14, 2023
kchibisov commentedon Feb 14, 2023
If something is missing is stck master, it's only because it wasn't ported yet. SCTK had abstractions for dnd and clipboard(it's the same thing) for a long time. We have a PR adding DND already for Wayland, it just breaks clipboard on gnome, because gnome doesn't allow client to bind multiple times to data device.
ids1024 commentedon Feb 14, 2023
Data device support is specifically one of the blockers for the next release of sctk. There's a PR for it: Smithay/client-toolkit#301
Good question. Maybe the Wayland protocol spec could use some clarification on this? Normally binding something multiple times is perfectly fine and works correctly (and may be needed when multiple libraries are making Wayland calls), so without text in the spec about this the Gnome behavior sounds incorrect.
kchibisov commentedon Feb 14, 2023
That works fine on sway for example, it just gnome is special and doesn't bother to fix anything. I bet it still sends
modifiersevents incorrectly and I have to carry workarounds for gnome to ignore its non-compliance to wayland protocol.WhyNotHugo commentedon Feb 15, 2023
Ah, thanks for pointing out the new DataDevice implementation in sctk, I'd missed it. This seems to bind the data device global only once for both clipboard and drag-and-drop, so should be usable here, right?
Looks like the GNOME bug was fixed: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1253 https://gitlab.gnome.org/GNOME/mutter/-/commit/7e4e3714663952a69ba0a26662841fc5c0cb266c
ids1024 commentedon Feb 17, 2023
I believe the issue is that winit doesn't currently provide clipboard support (#2156). It looks like toolkits and such in Rust are currently mostly using
smithay-clipboard(directly or via a crate that abstracts multiple platforms). But another library like that will bind its own copy of the data device.So I guess to fix it on the version of Mutter with this issue, it would be necessary to also add clipboard support to winit, and then software updating to the new version of winit would need to update their clipboard support to use winit's implementation. Which for the most part is probably how it should be done anyway.
Though maybe not an issue if it was fixed in Gnome a couple years ago? Not sure what release it made it into of if it was backported. Or if this is any issue in any other compositor.
WhyNotHugo commentedon Feb 18, 2023
GitLab indicates that the fix made it to the
gnome-3-36-backportbranch: https://gitlab.gnome.org/rmader/mutter/-/commit/1ec91cc8eef1db353d852fc4c212cae3a9cb1aeeids1024 commentedon Feb 18, 2023
Okay, so that should be on Ubuntu 20.04 (the previous LTS) and the like.
That sounds like it should generally cover current Gnome users that are using Wayland.
tfachmann commentedon Jan 11, 2024
Any updates regarding this? Or better said, is there any blocking instance left?
kchibisov commentedon Jan 11, 2024
After #3367.
1 remaining item
cdata commentedon Dec 31, 2024
#3367 is completed as of almost a year ago. Would it be possible to note the latest blockers to fixing this issue?
zinifier commentedon Jan 2, 2025
I tried applying #4009 and it seems to fix the problem in my example application.
timon-schelling commentedon Aug 9, 2025
Anything new on this?
We need this in the upcoming Graphite Desktop App.
Are there any blockers or anything else we might be able to help with?
kchibisov commentedon Aug 9, 2025
The question is whether you'd need it in winit 0.30 or 0.31. Assuming that we're talking about dnd in the form it is right now which is very limited.
timon-schelling commentedon Aug 9, 2025
Depends on the timeline for 0.31. Will the dnd system be reworked in 0.31? If yes, does that mean Wayland support will not come in 0.30 because you prioritize the long term solution?
We are trying to release soon, but Linux/Wayland features missing will not be blocking.
lanastara commentedon Jan 6, 2026
Are there any plans to include this in 0.31 now that the dnd system has been reworked?
Third-Thing commentedon Apr 4, 2026
fix(ogre): default to native Wayland; ARTE_OGRE_X11=1 for drag-drop
feat(app): refactor de drag & drop, internacionalización completa y d…
uonr commentedon Aug 3, 2026
Is #4571 resolves this issue?
ogoffart commentedon Aug 3, 2026
yes
fix(gui): route through XWayland so drag & drop works on Wayland