Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
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 8:56
1  
Theres a bug filed about this for compiz. bugs.launchpad.net/ubuntu/+source/compiz/+bug/624810 –  Dorkus1218 May 3 '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 7:40
    
PS Jenkins bot (ps-jenkins) says "Fix committed into lp:unity at revision None, scheduled for release in unity, milestone 7.1.0" at bugs.launchpad.net/ubuntu/+source/metacity/+bug/111939 –  type May 29 '13 at 6:51
    
show 2 more comments

5 Answers

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.

share|improve this answer
    
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
add comment

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

share|improve this answer
    
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 8:28
    
i thought that too -- will check later whether it's easier now using gpodder on my subnotebook. cheers –  type May 18 '11 at 9: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: askubuntu.com/questions/43925/… –  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
show 2 more comments

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.

share|improve this answer
    
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
add comment

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.

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.