Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

drag and drop doesn't seem to work with applications running under xwayland

Open quantenzitrone opened this issue 2 years ago • 7 comments

I tested this in sway briefly, and it works, so this must be a Hyprland issue.

quantenzitrone avatar Nov 23 '22 02:11 quantenzitrone

what application to test? filezilla works for me perfectly fine.

vaxerski avatar Nov 24 '22 13:11 vaxerski

i tested rox-filer and dolphin (running under xwayland)

quantenzitrone avatar Nov 24 '22 13:11 quantenzitrone

works for me, dragged a file in dolphin to a different tab and it allowed me to copy it

vaxerski avatar Nov 24 '22 13:11 vaxerski

are you sure you ran dolphin under xwayland?

quantenzitrone avatar Nov 24 '22 13:11 quantenzitrone

yep

vaxerski avatar Nov 24 '22 13:11 vaxerski

hmm i'll have to try that again

quantenzitrone avatar Nov 24 '22 13:11 quantenzitrone

I can reproduce this, I used dragon-drop to drag a file into Caprine and Discord, both running in XWayland, and both ended up freezing for a while (Caprine froze for 40s and Discord for 10s), and the drop didn't have any effect on the app.

However, when running dragon-drop in XWayland (GDK_BACKEND=x11 dragon-drop), the drag-and-drop worked just fine! (apart from the file getting lost often when changing focus)

Also, when running dragon-drop in XWayland and dropping to a Wayland app, the dragged file would just start floating in the air on the last cursor position when dragon-drop was focused when the focus switches, so it's not actually possible to drag a file from XWayland to Wayland either.

When I ran dragon-drop as a source and as a target, it worked fine, as long as both were running either in Wayland or XWayland.

n3oney avatar Dec 02 '22 17:12 n3oney

I use PCManFM as my file manager and the instant I get to edge of the window the file is dropped, this problem doesn't occur over on Sway

BrodieRobertson avatar Mar 25 '23 04:03 BrodieRobertson

doesn't pcmanfm run on native wayland?

vaxerski avatar Mar 25 '23 13:03 vaxerski

There's 3 different versions of it, the one I'm using is running through Xwayland

Edit: The GTK2 version is what I had installed, this works properly on Sway, switching to the GTK3 branch which does run on native wayland allows me to drag the files into other native wayland windows, however I still can't drag into Xwayland windows

BrodieRobertson avatar Mar 25 '23 23:03 BrodieRobertson

That's an interesting one. Tried myself and pcmanfm-gtk2 is indeed broken, but pcmanfm-qt can dnd onto both wayland and xwayland apps. Odd.

I personally use dolphin and it also works alright.

vaxerski avatar Mar 26 '23 00:03 vaxerski

Dolphin is producing the exact same result as pcmanfm-qt and pcmanfm-gtk3 for me, I can't drag onto Xwayland windows

BrodieRobertson avatar Mar 27 '23 02:03 BrodieRobertson

huh. odd. I certainly seem to be able to. Since it works on sway, I'll look into it.

vaxerski avatar Mar 27 '23 06:03 vaxerski

@BrodieRobertson Are you using follow_mouse of != 1? In that case I managed to repro and noticed that it's just a months-old feature that broke at some point lul

fixed in b88de63abb41bfb8c07638e6277982503638c29d

still can't seem to dnd from xwl -> xwl or xwl -> wl so that's a separate issue though. Dunno what the issue is, but xwayland having a completely separate method of doing dnd doesn't help here. Couldn't find the issue. I'll try some more maybe tomorrow.

vaxerski avatar Mar 29 '23 23:03 vaxerski

i had follow_mouse=true when i had the issue

btw sorry for not replying, i started using i3 again, because i can use proprietary nvidia drivers on xorg, and i haven't had the motivation to fix my hyprland configuration to adapt to other changes i made for my nixos configuration

quantenzitrone avatar Mar 29 '23 23:03 quantenzitrone

that was to brodie, cuz he couldn't dnd from wl -> xwl

xwl -> * is still broken even on follow mouse 1

vaxerski avatar Mar 29 '23 23:03 vaxerski

oh ok

quantenzitrone avatar Mar 29 '23 23:03 quantenzitrone

I'm seeing this behavior too, but so far only in one scenario: dragging files from file-roller to thunar. The panel in thunar is highlighted when the file is dragged over, but when I let go, the file is not extracted. When I run both programs from terminals, I don't get any error output. However if I drag the file in reverse - from thunar to file-roller - the file is successfully added to the archive. And selecting "extract here" from thunar's context menu works fine. I tried this with follow_mouse = 0, 1, and 2 with the same results.

zenzoa avatar Apr 02 '23 22:04 zenzoa

follow_mouse has always been set to 1 for me

wl -> wl works wl -> xwl upon further testing half works

If I drag a file into discord, discord doesn't do anything with it, if I drag a video into my youtube studio to upload it does. So it may actually be a completely seperate issue with discord/electron

xwl -> * doesn't work

BrodieRobertson avatar Apr 04 '23 02:04 BrodieRobertson

can confirm that dragging from discord to firefox does not work.

themvl avatar Apr 04 '23 21:04 themvl

idk what the hell happened but I am suddenly now able to drag xwl->xwl?

xwl->wl doesn't work to me even on sway though, doesn't seem like either xwayland or wlr support this

vaxerski avatar Apr 05 '23 11:04 vaxerski

follow_mouse has always been set to 1 for me

wl -> wl works wl -> xwl upon further testing half works

If I drag a file into discord, discord doesn't do anything with it, if I drag a video into my youtube studio to upload it does. So it may actually be a completely seperate issue with discord/electron

xwl -> * doesn't work

i personally fixed that issue by launching discord with electron wayland flags: /usr/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland there was an experimental flag for pipewire screenshare but it doesn't work

enderprism avatar Jun 29 '23 10:06 enderprism

I'm seeing this behavior too, but so far only in one scenario: dragging files from file-roller to thunar. The panel in thunar is highlighted when the file is dragged over, but when I let go, the file is not extracted. When I run both programs from terminals, I don't get any error output. However if I drag the file in reverse - from thunar to file-roller - the file is successfully added to the archive. And selecting "extract here" from thunar's context menu works fine. I tried this with follow_mouse = 0, 1, and 2 with the same results.

I can replicate this exact issue. From file-roller to nautilus in my case. It works for adding to the archive, but not for extracting. follow_mouse is set to 1. Do note that both of these programs are Wayland native.

tralph3 avatar Sep 27 '23 00:09 tralph3

Hello, I'm having a weird case here in my app https://ossia.io related to this bug :

  • I am running Archlinux. When I build my app against my system Qt libraries (latest Qt, 6.7.1), and run it in Xwayland with QT_QPA_PLATFORM=xcb, drag and drop works in Hyprland. (It also works on other Wayland compositors, e.g. kwin)

  • When I build my app in Nix and run it (E.g. it runs against Nix-provided Qt libraries of the same version), suddenly drag'n'drop does not work with xwayland. It works under normal wayland but then a lot of features are broken (and will never work, for instance the app can load some audio plug-ins that will only ever support X11).

  • Same if I build Qt upstream myself and link against it.

  • An user reports the same under plain NixOS.

jcelerier avatar Jul 09 '24 16:07 jcelerier

dnd for xwayland support has been dropped, your archlinux mirror is likely mega old and still has some old version

Closing this as wontfix there is also a newer issue for this iirc

vaxerski avatar Jul 10 '24 18:07 vaxerski