diff --git a/js/ui/windowPreview.js b/js/ui/windowPreview.js index a27d0586f46d04f9de07e8891e431f05adbef37e..f9922f2806a2ff439f941515d952db5ba09a298f 100644 --- a/js/ui/windowPreview.js +++ b/js/ui/windowPreview.js @@ -85,7 +85,10 @@ var WindowPreviewLayout = GObject.registerClass({ const childBox = new Clutter.ActorBox(); - for (const child of container) { + const children = container.get_children(); + const nChildren = children.length; + for (let index = 0; index < nChildren; index++) { + const child = children[index]; if (!child.visible) continue; @@ -96,7 +99,9 @@ var WindowPreviewLayout = GObject.registerClass({ bufferRect.x - this._boundingBox.x1, bufferRect.y - this._boundingBox.y1); - const [, , natWidth, natHeight] = child.get_preferred_size(); + const size = child.get_preferred_size(); + const natWidth = size[2]; + const natHeight = size[3]; childBox.set_size(natWidth, natHeight); childBox.x1 *= scaleX;