windowPreview: Set window container during construction
The container is tightly coupled with the preview, and there is never a need to replace it at a later point. Set it directly during construction, so the underlying base class can make this explicit by marking the property as construct-only. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3615>
This commit is contained in:
parent
eae1e8b170
commit
0f9c13c55d
@ -49,18 +49,18 @@ export const WindowPreview = GObject.registerClass({
|
||||
this._workspace = workspace;
|
||||
this._overviewAdjustment = overviewAdjustment;
|
||||
|
||||
const windowContainer = new Clutter.Actor({
|
||||
pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
|
||||
});
|
||||
|
||||
super._init({
|
||||
reactive: true,
|
||||
can_focus: true,
|
||||
accessible_role: Atk.Role.PUSH_BUTTON,
|
||||
offscreen_redirect: Clutter.OffscreenRedirect.AUTOMATIC_FOR_OPACITY,
|
||||
windowContainer,
|
||||
});
|
||||
|
||||
const windowContainer = new Clutter.Actor({
|
||||
pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
|
||||
});
|
||||
this.window_container = windowContainer;
|
||||
|
||||
windowContainer.connect('notify::scale-x',
|
||||
() => this._adjustOverlayOffsets());
|
||||
// gjs currently can't handle setting an actors layout manager during
|
||||
|
Loading…
x
Reference in New Issue
Block a user