Constrain zoomed overview windows to the current monitor
Additionally, the constraint to not overlap the panel should only happen on the primary monitor. https://bugzilla.gnome.org/show_bug.cgi?id=609258
This commit is contained in:
parent
09f2028d6a
commit
df440496ee
@ -221,8 +221,15 @@ WindowClone.prototype = {
|
|||||||
|
|
||||||
let [width, height] = this.actor.get_transformed_size();
|
let [width, height] = this.actor.get_transformed_size();
|
||||||
|
|
||||||
this.actor.x = _clamp(this.actor.x, 0, global.screen_width - width);
|
let monitorIndex = this.metaWindow.get_monitor();
|
||||||
this.actor.y = _clamp(this.actor.y, Main.panel.actor.height, global.screen_height - height);
|
let availArea = global.get_monitors()[monitorIndex];
|
||||||
|
if (monitorIndex == global.get_primary_monitor_index()) {
|
||||||
|
availArea.y += Main.panel.actor.height;
|
||||||
|
availArea.height -= Main.panel.actor.height;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.actor.x = _clamp(this.actor.x, availArea.x, availArea.x + availArea.width - width);
|
||||||
|
this.actor.y = _clamp(this.actor.y, availArea.y, availArea.y + availArea.height - height);
|
||||||
},
|
},
|
||||||
|
|
||||||
_zoomStart : function () {
|
_zoomStart : function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user