[gnome-shell] workspace-thumbnails: Emit 'window-drag-cancelled'
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspace-thumbnails: Emit 'window-drag-cancelled'
- Date: Fri, 2 Dec 2011 16:08:55 +0000 (UTC)
commit 47b55e29d45fc7e1fdf72a4b2d0769fbe8d47d1b
Author: Florian MÃllner <fmuellner gnome org>
Date: Fri Dec 2 16:54:27 2011 +0100
workspace-thumbnails: Emit 'window-drag-cancelled'
The dash handles 'window-drag-cancelled', to be able to do the
animations for drag snap-back and size changes in parallel. As
the signal is not emitted for previews in the workspace switcher,
it does not work in that case.
js/ui/workspaceThumbnail.js | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 3305990..9c00654 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -51,6 +51,7 @@ const WindowClone = new Lang.Class({
dragActorMaxSize: Workspace.WINDOW_DND_SIZE,
dragActorOpacity: Workspace.DRAGGING_WINDOW_OPACITY });
this._draggable.connect('drag-begin', Lang.bind(this, this._onDragBegin));
+ this._draggable.connect('drag-cancelled', Lang.bind(this, this._onDragCancelled));
this._draggable.connect('drag-end', Lang.bind(this, this._onDragEnd));
this.inDrag = false;
},
@@ -108,6 +109,10 @@ const WindowClone = new Lang.Class({
this.emit('drag-begin');
},
+ _onDragCancelled : function (draggable, time) {
+ this.emit('drag-cancelled');
+ },
+
_onDragEnd : function (draggable, time, snapback) {
this.inDrag = false;
@@ -386,6 +391,10 @@ const WorkspaceThumbnail = new Lang.Class({
Lang.bind(this, function(clone) {
Main.overview.beginWindowDrag();
}));
+ clone.connect('drag-cancelled',
+ Lang.bind(this, function(clone) {
+ Main.overview.cancelledWindowDrag();
+ }));
clone.connect('drag-end',
Lang.bind(this, function(clone) {
Main.overview.endWindowDrag();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]