Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
quantenzitrone opened this issue Nov 23, 2022 · 26 comments
Labels
bug Something isn't working

Comments

@quantenzitrone
Copy link

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

@quantenzitrone quantenzitrone added the bug Something isn't working label Nov 23, 2022
@vaxerski
Copy link
Member

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

@quantenzitrone
Copy link
Author

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

@vaxerski
Copy link
Member

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

@quantenzitrone
Copy link
Author

are you sure you ran dolphin under xwayland?

@vaxerski
Copy link
Member

yep

@quantenzitrone
Copy link
Author

hmm i'll have to try that again

@n3oney
Copy link
Contributor

n3oney commented Dec 2, 2022

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.

@BrodieRobertson
Copy link

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

@vaxerski
Copy link
Member

doesn't pcmanfm run on native wayland?

@BrodieRobertson
Copy link

BrodieRobertson commented Mar 25, 2023

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

@vaxerski
Copy link
Member

vaxerski commented Mar 26, 2023

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.

@BrodieRobertson
Copy link

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

@vaxerski
Copy link
Member

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

@vaxerski
Copy link
Member

vaxerski commented Mar 29, 2023

@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 b88de63

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.

@quantenzitrone
Copy link
Author

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

@vaxerski
Copy link
Member

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

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

@quantenzitrone
Copy link
Author

oh ok

@zenzoa
Copy link

zenzoa commented Apr 2, 2023

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.

@BrodieRobertson
Copy link

BrodieRobertson commented Apr 4, 2023

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

@themvl
Copy link

themvl commented Apr 4, 2023

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

@vaxerski
Copy link
Member

vaxerski commented Apr 5, 2023

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

@enderprism
Copy link

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

@tralph3
Copy link

tralph3 commented Sep 27, 2023

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.

@jcelerier
Copy link

jcelerier commented Jul 9, 2024

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.

@vaxerski
Copy link
Member

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 vaxerski closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2024
@kRHYME7
Copy link

kRHYME7 commented Oct 10, 2024

Now I see why I can't DND for reaper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants