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

Dragging Files Between Windows #46

Open
TediouslyBored opened this issue Jan 27, 2017 · 19 comments
Open

Dragging Files Between Windows #46

TediouslyBored opened this issue Jan 27, 2017 · 19 comments

Comments

@TediouslyBored
Copy link

Would it be possible to allow for files to be dragged between windows? It would be nice to be able to drag a file from one window, hover it over the icon or preview of a second window, and have the second window be brought to the front. This would be helpful for dragging files from a file manager to Google Drive.

@moriel5
Copy link

moriel5 commented Jan 27, 2017

+1.
This personally is a pet peeve of mine, as I am used to doing that from back when I had used to be a Windows user.
Also for a minimized window to be restored or maximised (depending on how it was before it was minimized) when holding the file over the app's icon.

@franglais125
Copy link
Contributor

AFAIK:
This is not easy to implement within an extension. For more info you can take a lok at: micheleg/dash-to-dock#49, where the discussion took place for that extension, and the corresponding gnome bug is listed, with no solution.

tldr: functionality has to be implemented upstream before it can be done at the extension level.

@TediouslyBored
Copy link
Author

TediouslyBored commented Jan 28, 2017

May not be entirely related but with dash to panel disabled, files can be dragged to the top left hot corner and dragged over another window. With dash to panel enabled, dragging the file to the hot corner does not show the activities overview. Can that be fixed, or is it intentional?

@moriel5
Copy link

moriel5 commented Jan 28, 2017

Thanks, I had read @micheleg's answer, however I did not exactly understand the part about opening the windows.
Did he mean that it opens the activity view, or the corresponding window (which is what I need)?

@micheleg
Copy link

Basically the shell interface can't get information about which file is being dragged, but it can know a file is being dragged. But application windows can. My idea - never implemented - was on drag to show the open windows of the selected application, then hover the desired window to activate it, then drop. This is exactly the same dynamics you get by dragging a file to the activities button, and then look for the desired window. Showing only the windows of the selected application just makes it quicker.

@moriel5
Copy link

moriel5 commented Jan 28, 2017

Thanks for the quick reply!
Yeah, I have heard of GNOME's developers' notoriety of ignoring perfectly sound recommendations that do not originate from their own team, however it would seem that your idea was at least considered, but afterwards completely ignored, it's a shame.

There are no workarounds, other than calling upon the window view? Perhaps some custom code from the extension itself (although that will unfortunately limit the possibilites of integration with other extensions, and/or be too much to handle), or a seperate extensions that could "patch" the shell to allow other extensions to make use of it?

@micheleg
Copy link

It is my understanding that you really have to patch the C layer, which is just not possible from an extension. I don't blame GNOME developers though. It is probably a lack of direct interest for the feature - after all they don't need that functionality for the shell itself. I honestly haven't tried to push for the patch to be applied upstream. You could test and update the patch to current upstream, and try to push for merging.

@moriel5
Copy link

moriel5 commented Jan 29, 2017

Thank you very much.
Unfortunately, I simply do not have the time to so currently, however as soon as I'll be able to do so, I'll conduct tests and try pushing for an upstream merge, as it would be a shame for this feature to not be integrated.

The extension ecosystem should not be underestimated (I am also an Xposed Framework user on Android (whenever possible))!

@jderose9
Copy link
Contributor

jderose9 commented Feb 6, 2017

I definitely find this annoying too. While dropping the file directly onto the icon would be best, I think even just raising all the application's running windows when hovering the icon while dragging a file would be a big improvement without a lot of effort.

jderose9 added a commit that referenced this issue Mar 1, 2017
jderose9 added a commit that referenced this issue Mar 1, 2017
@jderose9
Copy link
Contributor

jderose9 commented Mar 1, 2017

The best solution I could get working in a reasonable amount of time was to popup the overview when you drag a file over the panel. Then you can drag over the window or workspace you are interested in and hover over the new window. After a couple of seconds that window will be raised and you can drop your file into it.

I wasn't able to find out anything about the contents of the dragged item, as @micheleg mentioned.

My next thought was to allow the user to hover over an icon and open the live preview window, then hover over one of those windows to raise it. But, grabbing focus by the preview window failed since it was already grabbed by the drag-and-drop handler, and the windows underneath were picking up the events. I tried a bunch of workarounds but basically no events get through to shell extensions except the drag-and-drop events in that state. You only know that a drag started, the mouse moved, and a drag ended.

I'm sure that with the inclination, it would be possible to override the grab handler to add some special cases, but even then you can't actually drop the item there without the C shell fix in place.

@jderose9
Copy link
Contributor

Re-opening as I haven't been happy with how cumbersome the current solution is. Hopefully someone can take initiative to push for the necessary upstream changes.

@brofjst
Copy link

brofjst commented Sep 30, 2019

+1
Since the last update i was able to drag files to another window by sliding the cursor on the panel, with the last update this feature does not work anymore.
OS: Arch
gnome-shell-extension-dash-to-panel-git 23.r54.g14ac72f-1
gnome-shell 1:3.34.0+152+g0fdbde910-1

I post here a video just to be more clear (in this video i'm trying to drag a pick found on facebook into telegram).

@charlesg99
Copy link
Member

Thanks for bringing that up @brofjst! Should now be fixed on master.

@brofjst
Copy link

brofjst commented Oct 2, 2019

Now it works, thank you!

@stale
Copy link

stale bot commented Jun 9, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@petrstepanov
Copy link

petrstepanov commented Dec 18, 2021

Hi, with respect to the drag and drop behavior. I noticed that when dash-to-dock autohide feature is enabled, and user tries to drag a file onto the dash-to-dock - the panel does not slide back on the screen.

Edit: I also checked "Dash to Dock" behavior and it works as expected. When user drags a file to the edge of the screen, panel pops out.

Should I open a separate issue?

@xalt7x
Copy link
Contributor

xalt7x commented Dec 18, 2022

It's implemented in this pull request for "Dash To Dock" (not perfect but works most of the time).

@BarbzYHOOL
Copy link

BarbzYHOOL commented May 14, 2023

this is so problematic, the PR above looks pretty simple to add at least to dash to dock, duno for dash to panel

there was also this thing https://askubuntu.com/questions/1030623/how-to-drag-and-drop-files-to-open-application

and new information here micheleg/dash-to-dock#49

@jderose9 @charlesg99 pinging just in case

@onlyreportingissues
Copy link

onlyreportingissues commented Aug 25, 2023

Very essential missing feature.

Couldn't this solution be applied here also @philippun1 @charlesg99 ?: paperwm/PaperWM#574

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests