diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 8afd94c0f..219ab6e89 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -368,8 +368,6 @@ WindowOverlay.prototype = { x, y); if (actor == this._windowClone.actor) { this.closeButton.show(); - // Reposition the close button in case we've changed display modes - this._updatePositions(); } this.title.show(); }, @@ -393,12 +391,6 @@ WindowOverlay.prototype = { this.title.height + this.title._spacing; }, - _updatePositions: function() { - let [cloneX, cloneY] = this._windowClone.actor.get_transformed_position(); - let [cloneWidth, cloneHeight] = this._windowClone.actor.get_transformed_size(); - this.updatePositions(cloneX, cloneY, cloneWidth, cloneHeight); - }, - /** * @cloneX: x position of windowClone * @cloneY: y position of windowClone @@ -468,8 +460,6 @@ WindowOverlay.prototype = { }, _onEnter: function() { - this._updatePositions(); - this._parentActor.raise_top(); this.closeButton.show(); this.emit('show-close-button'); diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 2c9e867db..61a89f882 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -505,11 +505,13 @@ SingleView.prototype = { workspace.gridX = this._x + (w - position) * workspace.actor.width; workspace.gridY = this._y; workspace.actor.set_position(workspace.gridX, workspace.gridY); + // show the overlay unconditionally first, so items get + // positioned correctly, then hide if necessary + workspace._windowOverlaysGroup.show(); if (isInt) { if (this.actor.get_stage() != null) workspace.positionWindows(0); if (w == position) { - workspace._windowOverlaysGroup.show(); workspace.actor.show(); } else { workspace._windowOverlaysGroup.hide();