Summary: | Dragging screenshots from Spectacle into Firefox broke recently | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Nate Graham <nate> |
Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED LATER | ||
Severity: | normal | CC: | postix |
Priority: | NOR | Keywords: | regression |
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 5.26 | |
Sentry Crash Report: |
Description
Nate Graham
2021-11-17 19:22:55 UTC
Works with both Firefox and Chromium in XWayland mode. So just Firefox Wayland regressed here for invent.kde.org text fields. I don't recall any recent Firefox updates. Also reproduces with trying to drag images from Spectacle into a Wordpress editor view in Firefox, which I use for my weekly blog posts. What I see is that file drag-and-drop works sometimes. After quick debugging, I see that if Firefox accepts text/uri-list, then drag-and-drop works! If Firefox accepts text/vnd.portal.filetransfer, drag-and-drop does not work. https://invent.kde.org/frameworks/kcoreaddons/-/blob/b1deba29a10b82de9fe132e4a008be1df37b7057/src/lib/io/kurlmimedata.cpp#L111 if I add `&& false`, i.e. disable xdg portal integration, then dnd works as expected. It still randomly fails to perform drop even when using text/uri-list... I can reproduce similar issue when running Firefox in GNOME Shell. One half of the puzzle: https://gitlab.freedesktop.org/wayland/wayland/-/issues/322 Even after making kwin send wl_data_offer.source_actions, there are still issues with drag-and-drop in Firefox: the first dnd works, but the next one does not. Even after making kwin send wl_data_offer.source_actions before wl_data_device.enter* Second half of the puzzle: kwin not always sends wl_data_device.leave when drop occurred A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2986 A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2991 Git commit 3546cc0541349feea42080b9df50fd76f3e1cd2b by Vlad Zahorodnii. Committed on 23/09/2022 at 08:43. Pushed by vladz into branch 'master'. wayland: Send wl_data_offer.source_actions before wl_data_device.enter This makes kwin's behavior consistent with other wayland compositors (sway, GNOME Shell, etc) and it's reasonable to provide all the information about the data source before wl_data_device.enter. It also makes Firefox happier. Relevant discussion upstream: https://gitlab.freedesktop.org/wayland/wayland/-/issues/322 M +1 -1 src/wayland/datadevice_interface.cpp https://invent.kde.org/plasma/kwin/commit/3546cc0541349feea42080b9df50fd76f3e1cd2b Git commit 00621892ff228b07f0735708ac5597506c29e4c6 by Vlad Zahorodnii. Committed on 23/09/2022 at 09:30. Pushed by vladz into branch 'Plasma/5.26'. wayland: Send wl_data_offer.source_actions before wl_data_device.enter This makes kwin's behavior consistent with other wayland compositors (sway, GNOME Shell, etc) and it's reasonable to provide all the information about the data source before wl_data_device.enter. It also makes Firefox happier. Relevant discussion upstream: https://gitlab.freedesktop.org/wayland/wayland/-/issues/322 (cherry picked from commit 3546cc0541349feea42080b9df50fd76f3e1cd2b) M +1 -1 src/wayland/datadevice_interface.cpp https://invent.kde.org/plasma/kwin/commit/00621892ff228b07f0735708ac5597506c29e4c6 Note that you will need https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5045 in order to make drag-and-drop work reliably in Firefox. If you run the aforementioned gtk patch and the kwin patch, drag-and-drop should work in Firefox, you may still experience minor issues in FF though, in my case, the comment editor keeps showing the attachment icon after drop. At this point, we can't do a lot, until the final decision on https://gitlab.freedesktop.org/wayland/wayland/-/issues/323 is made. |