[gnome-shell] dnd: If needed, destroy _dragActor in _cancelDrag
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] dnd: If needed, destroy _dragActor in _cancelDrag
- Date: Mon, 21 Mar 2011 21:40:01 +0000 (UTC)
commit d38f41a459e3ce8bc11aeeca1efae443df49f73b
Author: Maxim Ermilov <zaspire rambler ru>
Date: Mon Jan 31 02:04:56 2011 +0300
dnd: If needed, destroy _dragActor in _cancelDrag
In the case where the original actor is destroyed, we don't
show a snap back animation, so we need to destroy drag actor
as we would do in _onAnimationComplete.
https://bugzilla.gnome.org/show_bug.cgi?id=640781
js/ui/dnd.js | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/dnd.js b/js/ui/dnd.js
index 46d32fd..46440d6 100644
--- a/js/ui/dnd.js
+++ b/js/ui/dnd.js
@@ -507,6 +507,9 @@ _Draggable.prototype = {
if (!this._buttonDown)
this._dragComplete();
this.emit('drag-end', eventTime, false);
+ if (!this._dragOrigParent)
+ this._dragActor.destroy();
+
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]