[dnd] Optionally restore the drag actor

Currently, the drag and drop code assumes that on a successful drop
the target will either consume the drag actor or that it is otherwise
OK to destroy the actor.
As the drag behavior for window preview was changed, dropping a preview
on the dash now results in the preview being swallowed - to fix, add an
option to restore the actor in case of a successful drop as well.

https://bugzilla.gnome.org/show_bug.cgi?id=619203
This commit is contained in:
Florian Müllner
2010-05-20 16:44:45 +02:00
parent a0be7fa455
commit 3e2a9a57a1
3 changed files with 53 additions and 19 deletions

View File

@ -125,7 +125,8 @@ WindowClone.prototype = {
Lang.bind(this, this._onLeave));
this._draggable = DND.makeDraggable(this.actor,
{ dragActorMaxSize: WINDOW_DND_SIZE,
{ restoreOnSuccess: true,
dragActorMaxSize: WINDOW_DND_SIZE,
dragActorOpacity: DRAGGING_WINDOW_OPACITY });
this._draggable.connect('drag-begin', Lang.bind(this, this._onDragBegin));
this._draggable.connect('drag-end', Lang.bind(this, this._onDragEnd));