workspace: Set overviewHint on MetaWindow

We want to stop using the MetaWindowActor for things which are actually
related to the MetaWindow, one more thing where we can change that is
the overviewHint, which is currently added to the MetaWindowActor.

So move that hint to the MetaWindow and stop calling
get_compositor_private() in a few more places.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
This commit is contained in:
Jonas Dreßler 2020-06-12 20:12:11 +02:00
parent 46600740fe
commit 8c49f45ac8

View File

@ -1459,7 +1459,7 @@ class Workspace extends St.Widget {
const [transformedWidth, transformedHeight] = const [transformedWidth, transformedHeight] =
clone.get_transformed_size(); clone.get_transformed_size();
win._overviewHint = { metaWin._overviewHint = {
x: stageX, x: stageX,
y: stageY, y: stageY,
width: transformedWidth, width: transformedWidth,
@ -1536,12 +1536,12 @@ class Workspace extends St.Widget {
let clone = this._addWindowClone(win, false); let clone = this._addWindowClone(win, false);
if (win._overviewHint) { if (metaWin._overviewHint) {
let x = win._overviewHint.x - this.x; let x = metaWin._overviewHint.x - this.x;
let y = win._overviewHint.y - this.y; let y = metaWin._overviewHint.y - this.y;
const width = win._overviewHint.width; const width = metaWin._overviewHint.width;
const height = win._overviewHint.height; const height = metaWin._overviewHint.height;
delete win._overviewHint; delete metaWin._overviewHint;
clone.positioned = true; clone.positioned = true;
@ -1985,7 +1985,7 @@ class Workspace extends St.Widget {
// Set a hint on the Mutter.Window so its initial position // Set a hint on the Mutter.Window so its initial position
// in the new workspace will be correct // in the new workspace will be correct
window.get_compositor_private()._overviewHint = { window._overviewHint = {
x: actor.x, x: actor.x,
y: actor.y, y: actor.y,
width: actor.width, width: actor.width,