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,247

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.

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
  • 174,526
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
  • 217
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
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
-1

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

type
  • 3,247