Skip to content

Commit 08580ab

Browse files
committed
Recreate windows preview whenever the popup is open.
This ensure previews aspect ratio is correct when windows are resized after their preview is first created (first time the menu is open).
1 parent 86f4404 commit 08580ab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

windowPreview.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ const WindowPreviewMenu = new Lang.Class({
5959
this._arrowSide = side;
6060
this._boxPointer._arrowSide = side;
6161
this._boxPointer._userArrowSide = side;
62-
63-
this._previewBox = new WindowPreviewList(this._source, this._dtdSettings);
64-
this.addMenuItem(this._previewBox);
6562
},
6663

6764
_redisplay: function() {
68-
this._previewBox._shownInitially = false;
65+
if (this._previewBox)
66+
this._previewBox.destroy();
67+
this._previewBox = new WindowPreviewList(this._source, this._dtdSettings);
68+
this.addMenuItem(this._previewBox);
6969
this._previewBox._redisplay();
7070
},
7171

0 commit comments

Comments
 (0)