Fix slightly misplaced overlays in single view

Correct the positioning of window captions and close buttons for
non-active workspaces in single view.

https://bugzilla.gnome.org/show_bug.cgi?id=607872
This commit is contained in:
Florian Müllner 2010-01-23 10:16:12 +01:00 committed by Colin Walters
parent 31f9da7b8f
commit dc3ff10c6f
2 changed files with 3 additions and 11 deletions

View File

@ -368,8 +368,6 @@ WindowOverlay.prototype = {
x, y); x, y);
if (actor == this._windowClone.actor) { if (actor == this._windowClone.actor) {
this.closeButton.show(); this.closeButton.show();
// Reposition the close button in case we've changed display modes
this._updatePositions();
} }
this.title.show(); this.title.show();
}, },
@ -393,12 +391,6 @@ WindowOverlay.prototype = {
this.title.height + this.title._spacing; 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 * @cloneX: x position of windowClone
* @cloneY: y position of windowClone * @cloneY: y position of windowClone
@ -468,8 +460,6 @@ WindowOverlay.prototype = {
}, },
_onEnter: function() { _onEnter: function() {
this._updatePositions();
this._parentActor.raise_top(); this._parentActor.raise_top();
this.closeButton.show(); this.closeButton.show();
this.emit('show-close-button'); this.emit('show-close-button');

View File

@ -505,11 +505,13 @@ SingleView.prototype = {
workspace.gridX = this._x + (w - position) * workspace.actor.width; workspace.gridX = this._x + (w - position) * workspace.actor.width;
workspace.gridY = this._y; workspace.gridY = this._y;
workspace.actor.set_position(workspace.gridX, workspace.gridY); 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 (isInt) {
if (this.actor.get_stage() != null) if (this.actor.get_stage() != null)
workspace.positionWindows(0); workspace.positionWindows(0);
if (w == position) { if (w == position) {
workspace._windowOverlaysGroup.show();
workspace.actor.show(); workspace.actor.show();
} else { } else {
workspace._windowOverlaysGroup.hide(); workspace._windowOverlaysGroup.hide();