cosmic-epoch icon indicating copy to clipboard operation
cosmic-epoch copied to clipboard

[Bug] Drag and drop not working

Open AndreiMihalea opened this issue 1 year ago • 7 comments

Hello,

Drag and drop doesn't seem to work for me, unless I do it between two instances of Cosmic Files. I've tried dragging and dropping from Cosmic FIles to Vivaldi Browser and Pycharm (or other JetBrains IDEs) and it doesn't work for either of them.

I'm on PopOs 24.04.

AndreiMihalea avatar Oct 24 '24 13:10 AndreiMihalea

I can drag and drop files in to Firefox, but not in to Chrome. Both tests were made attempting to attach a file to an email in Outlook web.

BVildljung avatar Oct 24 '24 18:10 BVildljung

drag and drop from gnome files or cosmic files to vlc also does not seem to work

william1530 avatar Nov 30 '24 16:11 william1530

I'm unable to drag and drop files from Cosmic Files into a Google drive folder on Brave browser

Zie0 avatar Jan 01 '25 15:01 Zie0

I've been having the same problem on 24.04. Firefox runs natively on Wayland and has no problem. I suspected this has to do with xwayland apps because almost all apps showing the problem are run under xwayland. I also have problem drag/drop with Flatpaks VLC, which also uses xwayland.

avatar4d avatar Jan 23 '25 20:01 avatar4d

Further confirming my suspicion this is an xwayland problem... You can fix Brave/Chrome by running it under Wayland. You can do that by setting Preferred Ozone platform to Auto. You can find it via either brave://flags or chrome://flags respectively.

See reference here: https://askubuntu.com/questions/1513874/cannot-drag-and-drop-items-in-ubuntu-chrome

avatar4d avatar Jan 24 '25 16:01 avatar4d

it doesnt work to brave/chromium too.

cnikolov avatar Mar 04 '25 14:03 cnikolov

Also doesn't work to Kitty

relma2 avatar Mar 17 '25 19:03 relma2

It still doesn't work on Krita too.

melikechan avatar Jun 01 '25 11:06 melikechan

Is this feature just not implemented yet? Any way to help? I have some experience in rust

kartonrad avatar Sep 11 '25 19:09 kartonrad

@kartonrad i suppose you could just fork the code and do so yourself. i'd certainly be willing to assist.

relma2 avatar Sep 11 '25 19:09 relma2

If you want to contribute to COSMIC, this probably is a pretty tough place to start. You not only need to work with Rust, but also with both Wayland and X11, and how they both implement drag and drop. (And it's not been implemented yet because getting it to work properly, in both directions, is a bit of a pain.)

Though it's all open source, so anyone is welcome to take a look at the clipboard code in cosmic-comp and give it a try.

It should be possible to run most clients these days with a native Wayland backend. QT_QPA_PLATFORM=wayland should work for most Qt applications, while something like the args --enable-features=UseOzonePlatform --ozone-platform=wayland usually works for Electron applications, and Chromium. For Flatpak apps, you may also need to configure flatpak to expose the Wayland socket to the app.

ids1024 avatar Sep 11 '25 19:09 ids1024

This has kindof piqued my interest... Like sure it may be a difficult topic to jump into, but i'd at least like to try and compile and run cosmic.

I run the PopOs Alpha on my Laptop, and still have windows on my desktop Do you have some pointers, as to what would be the easiest way to compile and run the DE for testing purposes?

Do i need to switch to a system that doesn't yet have cosmic? Or can i compile it and start up cosmic2 in my tty3 or something?

I don't want to waste ur time coaching a total beginner with questionable endurance, but if you have a link or a hint that i could follow up, that'd be a great help!

kartonrad avatar Sep 12 '25 18:09 kartonrad

Ah wait that's exactly the use case for the systemd sysext thing Okay hold on - i think i got it for now

I'll experiment and see if i am up for the task

kartonrad avatar Sep 12 '25 19:09 kartonrad