sway
sway copied to clipboard
Bad drag and drop behavior with mixed window types (xwayland and wayland)
Please fill out the following:
-
Sway Version:
- sway version 1.6-96102184 (Jul 12 2021, branch 'master')
-
Description:
- When an object is dragged from a wayland window onto an xwayland window, the xwayland window responds as if it knows an object is being held and about to be dropped onto it, but never catches the drop (releasing the mouse causes nothing to happen.
- When an object is instead dragged from an xwayland window onto a wayland window the window has no response at all and if the object is dropped an xwayland window 'underneath' on another workspace can catch it instead.
- When both window types match everything works as expected, both types.
- To reproduce open Thunar in wayland and xwayland and firefox or chromium in the opposite (chromium is more responsive with the hover detection than firefox but the issue is the same for both) and drag a file from Thunar into the browser. A website like https://uguu.se/ will clearly react to drag and drop if you are lacking one.
When an object is dragged from a wayland window onto an xwayland window, the xwayland window responds as if it knows an object is being held and about to be dropped onto it, but never catches the drop (releasing the mouse causes nothing to happen.
Is this just for "rich" objects? I can drag-and-drop text from Wayland (Slack/gedit, etc.) to Xwayland (Chromium) fine -- can you? I can reproduce things like images not making their way properly.
When an object is instead dragged from an xwayland window onto a wayland window the window has no response at all
Xwayland → Wayland drag-and-drop is not implemented in wlroots yet. See the checklist in https://github.com/swaywm/wlroots/pull/760.
and if the object is dropped an xwayland window 'underneath' on another workspace can catch it instead.
Well, that's kind of awkward, but would naturally be fixed alongside the above.
Is this just for "rich" objects? I can drag-and-drop text from Wayland (Slack/gedit, etc.) to Xwayland (Chromium) fine -- can you? I can reproduce things like images not making their way properly.
I tested highlighting and dragging text from gedit (wayland) into a text field in chromium (xwayland), it never makes it onto the page. Gedit under xwayland drops the text into the box fine. I don't know why this would fail for me and not you.
Is there a workaround for this issue?
Possibly related problem: dragging a file from SpaceFM (xwayland), switching to another workspace with Firefox (wayland), dropping: file is dropped back to SpaceFM despite it is not on screen anymore.