30

Example

Drag media file onto Totem's playlist to enqueue

Bug in Compiz

Especially for Unity (formerly Netbook Edition, being intended for small screens) this is quite a vital feature, as applications most often are run fullscreen, and dragging with the touchpad can be cumbersome.

https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/624810

Any hint on where to start fixing the bug? Which file/line in compiz source code?

Usability background

According to Fitts, Accot, and Zhai, the time required to rapidly move to a target area is a function of the distance to and the size of the target (cf. Fitts's law and Steering law).

Drag'n'Drop without Alt-Tab across fullscreen windows requires

  1. start to drag object
  2. move to launcher/taskbar
  3. steer to target app icon -- small and distant target!
  4. wait for app to become focused
  5. steer onto window -- (huge target)
    optionally: steer onto intended area of window, e.g. playlist (fairly large target)
  6. drop object

Drag'n'Drop with Alt-Tab on the other hand only requires

  1. start to drag object
  2. Alt-Tab to other app
    optionally: steer onto intended area of window, e.g. playlist (fairly large target)
  3. drop object

Thus, no small and distant target required for Drag'n'Drop whilst Alt-tabbing

Workarounds

Interesting and probably for many users useful alternative approaches are presented in the answers below. Great many thanks to the community!

Correct answer

... seems to be available only when the bug is fixed, though.

Some more recent action, maybe relevant as related bug: https://bugs.launchpad.net/ayatana-design/+bug/727903

type
  • 3,237
  • Not really practical as too many keys involved but interesting enough: Drag'n'Drop with switching workspaces via keyboard works (Ctrl + Alt + Arrow). – type Apr 30 '11 at 08:56
  • 1
    Theres a bug filed about this for compiz. https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/624810 – Dorkus1218 May 03 '11 at 19:41
  • 2
    This is one of the most irritating thing in gnome classic as well. previous to this version I could just drag and pointed on the application which is in the panel and that application was brought in front there I could drop the file/text/selection. This bug needs to be fixed as early as possible – puneet May 23 '11 at 07:40
  • 1
    PS Jenkins bot (ps-jenkins) says "Fix committed into lp:unity at revision None, scheduled for release in unity, milestone 7.1.0" at https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/111939 – type May 29 '13 at 06:51
  • 1
    https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/111939/comments/43/+download (12.1 KiB) – type Jun 07 '13 at 14:25
  • "Status changed to 'Confirmed' because the bug affects multiple users." (?) https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/111939 – type Jun 13 '13 at 07:00
  • "This is bug is over three years old. Is someone working on this? Drag and drop is a basic functionality of every modern desktop. I can't believe no one has worked on this for three years, when there are even comments from Mark Shuttleworth about the criticality of this issue." -- https://bugs.launchpad.net/bugs/607796 – type Sep 20 '13 at 11:46

6 Answers6

5

The way I found it working:

  1. Start dragging,
  2. Keeping your mouse button pressed, press Super + (0-9) to switch the application,
  3. Continue dragging and drop.

Note: In step 2 you can hold the Super key for a moment, the launcher will appear and will display you which number (0-9) is assigned to which application.

  • The Super key is a good hint, although drop seems to work only on the launcher item, not on the thus re-showing window (eg totem). Adding thus to the totem playlist only works with the enqueue workaround. So again, sorry that this doesn't help in the general case of task switching with the keyboard while drag'n'drop with the mouse. – type May 18 '11 at 22:41
  • Doesnt work for me unfortunately. Super key does nothing on Ubuntu 20 – vozman Aug 28 '20 at 11:59
5

I haven't found a reliable way to drop file-manager files onto (for example) Totem whilst the receiving application is full-screen - however if you dont make the receiving application full-screen, the following works for me.

Run CCSM and edit the Scale Addon.

Click "Initiate Window Picker" (initiate edge i.e. the one with the monitor icon) and assign BottomRight to it.

Next start the receiving application (not full screen).

Initiate Drag-and-drop from file manager for the files you want - drag the mouse to the BottomRight of the screen - SpreadMode will occur for all windows. Drag the mouse to receiving application. Spread Mode will close, with the receiving application as the active window. Drop the item(s) you have been dragging.

I've tried this with the example of Totem as full-screen. It works some of the time, but not reliably. I think its the global-menu that is grabbing various events.

N.B. To get the example Totem to accept one of more files on the drop will need a slight-modification to its desktop launcher as described in this AU question

fossfreedom
  • 172,746
  • thanks for the totem --enqueue hint! still i'd prefer a keyboard shortcut to switch to the other app for accepting the drop (any app, not only ones i positioned 1--9 in the launcher) ... thanks also for the 'spread' bug issue, maybe it's related with Alt-Tab? – type May 18 '11 at 08:28
  • i thought that too -- will check later whether it's easier now using gpodder on my subnotebook. cheers – type May 18 '11 at 09:31
  • the --enqueue seems great for now -- unfortunately not the whole intention of this question, but i could maybe create a totem specific one ... – type May 18 '11 at 22:36
  • As above: sorry to be unclear fossfreedom. I'm having an issue of not being able to Alt-Tab (or keyboard-wise task switching in general) while Drag'n'Drop with any app whatsoever. Totem playlist was just the current example. As there's a bug filed for the issue in question I would love to push fixing it. Plz copy your totem answer here: http://askubuntu.com/questions/43925/how-to-configure-movie-player-totem-to-append-to-playlist-instead-of-replacing – type May 19 '11 at 19:51
  • Type - have added a slightly modified answer to the new question. To be honest, until the bug is fixed, you'll unlikely have a "ALT-TAB" solution. The workaround above will work for all applications - not just totem. The key issue is that the receiving application cannot be full-screen. Again - probably a bug which should be filed on launchpad. – fossfreedom May 19 '11 at 19:58
  • hm, if the target application cannot be fullscreen i could as well drag stuff thereto directly, no? cheers – type May 23 '11 at 21:26
  • true - but if you have stuff spread across multiple workspaces then this works very well. Certainly supports the way I work anyway. – fossfreedom May 23 '11 at 21:33
0

Not related to totem, but i've found a way to alt-tab while drag-and-dropping files (drag pycharm file to chrome). Tested on Ubuntu 20. The main detail is to not move a mouse until you finished alt-tabbing.

  1. Click on file and keep mouse button pressed.
    DON'T MOVE THE CURSOR. The cursor should stay still
    Only click and hold. (There will be your usual cursor icon, no drag-and-drop icon)
  2. Alt-tab
  3. Start moving the cursor and drop the file wherever you want(now you will have drag-and-drop icon)
vozman
  • 218
0

Another workaround to drag and drop between two applications:

  1. Click and start dragging the item in the window of Application #1
  2. Click ALT+F1 to activate the Launcher item selection mode
  3. This may be a little uncomfortable: press the down (or up) arrow key on the keyboard to move the Launcher cursor to the Application #2
  4. Press the Enter key to activate the selected Application #2
  5. Drop the dragged item on to the window that pops up

Note: this does not work (at least this way) with two windows of the same application.

Andrew
  • 247
  • 4
  • 13
0

Assuming that you have the app open that you want to drop onto: start dragging the file, go over to the launcher (which should show shortly after you start dragging) and hover on the app that you want to drop to, this should show the open windows of that app, then while still dragging the file, hover on the window you want to drop to and wait for that window to become active (the default is 500ms but this can be changed in ccsm) you can then drop the file wherever you like.

This may sound long winded but it doesn't take very long, especially if you turn down the "Drag and Drop Hover Timeout" in the Behaviour tab of the Scale plugin in ccsm (available in the Software Centre), I have mine at 200ms and that's fine.

Luke
  • 111
  • sorry doesn't work for me, totem playlist does not accept the drop – type May 15 '11 at 21:59
  • So is the problem with what Totem does when you drop a file onto it? If so then the title of the question is a little confusing. – Luke May 18 '11 at 21:55
  • Sorry to be unclear Luke. I'm having an issue of not being able to Alt-Tab (or keyboard-wise task switching in general) while Drag'n'Drop with any app whatsoever. Totem playlist was just the current example. As there's a bug filed for that I would love to push fixing the bug but am happy to see some practical workarounds at the moment. Following the totem example I ended up to set totem to stay on top so that I can drop into its playlist... – type May 18 '11 at 22:09
-1

It works under Unity 2D because Unity 2D does not rely on Compiz but on Metacity/Mutter:

type
  • 3,237