[Overview] Postpone window repositioning while zooming

After closing a window, the remaining previews are repositioned
after a timeout; when it is called while the user zooms a preview,
the window positions get all messed up, so postpone the positioning
in this case until the zoom ends.

https://bugzilla.gnome.org/show_bug.cgi?id=613536
This commit is contained in:
Florian Müllner 2010-03-21 19:33:52 +01:00
parent 8d3abea6ef
commit 8b3d4857aa

View File

@ -135,6 +135,7 @@ WindowClone.prototype = {
this._draggable.connect('drag-end', Lang.bind(this, this._onDragEnd));
this.inDrag = false;
this._windowIsZooming = false;
this._zooming = false;
this._selected = false;
},
@ -1209,6 +1210,9 @@ Workspace.prototype = {
},
_delayedWindowRepositioning: function() {
if (this._windowIsZooming)
return true;
let [child, x, y, mask] =
Gdk.Screen.get_default().get_root_window().get_pointer();
let wsWidth = this.actor.width * this.scale;
@ -1533,6 +1537,14 @@ Workspace.prototype = {
this.emit('window-drag-end', clone.actor);
overlay.show();
}));
clone.connect('zoom-start',
Lang.bind(this, function() {
this._windowIsZooming = true;
}));
clone.connect('zoom-end',
Lang.bind(this, function() {
this._windowIsZooming = false;
}));
this.actor.add_actor(clone.actor);