Skip to content

Commit a4d5c30

Browse files
committed
gwl: Monitor clones, but only to update size.
Manually resized windows need to have their clones' scaled size updated to maintain the window's aspect ratio.
1 parent f7516fe commit a4d5c30

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

files/usr/share/cinnamon/applets/[email protected]/menus.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,8 @@ class WindowThumbnail {
715715
return;
716716
}
717717

718+
this.signals.connect(texture, 'size-changed', () => this.refreshThumbnail());
719+
718720
let [width, height] = this.metaWindowActor.get_size();
719721
let scale = Math.min(1.0, thumbnailWidth / width, thumbnailHeight / height) * global.ui_scale;
720722
width = Math.round(width * scale);
@@ -727,10 +729,13 @@ class WindowThumbnail {
727729
this.thumbnailActor.child = WindowUtils.getCloneOrContent(this.metaWindowActor, width, height);
728730

729731
if (this.thumbnailActor.child.name?.startsWith("TextureWindowClone")) {
730-
global.logTrace();
731-
this.signals.connect(texture, 'size-changed', () => this.refreshThumbnail());
732732
this.signals.connect(this.metaWindow, 'notify::minimized', () => this.refreshThumbnail());
733733
}
734+
} else {
735+
this.thumbnailActor.child.width = width;
736+
this.thumbnailActor.child.height = height;
737+
this.thumbnailActor.queue_relayout();
738+
734739
}
735740
} else if (this.groupState.isFavoriteApp) {
736741
this.groupState.trigger('removeThumbnailFromMenu', this.metaWindow);

0 commit comments

Comments
 (0)