js: Listen to notify::allocation instead of allocation-changed

ClutterActors "allocation-changed" signal was removed since it's no
longer needed now that there are no ClutterAllocationFlags anymore.

See https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1245

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1245
This commit is contained in:
Jonas Dreßler 2020-05-09 21:37:18 +02:00
parent 9b99b67fea
commit faaed642a7
3 changed files with 5 additions and 5 deletions

View File

@ -30,8 +30,8 @@ var BarLevel = GObject.registerClass({
accessible_role: Atk.Role.LEVEL_BAR, accessible_role: Atk.Role.LEVEL_BAR,
}; };
super._init(Object.assign(defaultParams, params)); super._init(Object.assign(defaultParams, params));
this.connect('allocation-changed', (actor, box) => { this.connect('notify::allocation', () => {
this._barLevelWidth = box.get_width(); this._barLevelWidth = this.allocation.get_width();
}); });
this._customAccessible = St.GenericAccessible.new_for_actor(this); this._customAccessible = St.GenericAccessible.new_for_actor(this);

View File

@ -246,7 +246,7 @@ var LayoutManager = GObject.registerClass({
vertical: true }); vertical: true });
this.addChrome(this.panelBox, { affectsStruts: true, this.addChrome(this.panelBox, { affectsStruts: true,
trackFullscreen: true }); trackFullscreen: true });
this.panelBox.connect('allocation-changed', this.panelBox.connect('notify::allocation',
this._panelBoxChanged.bind(this)); this._panelBoxChanged.bind(this));
this.modalDialogGroup = new St.Widget({ name: 'modalDialogGroup', this.modalDialogGroup = new St.Widget({ name: 'modalDialogGroup',

View File

@ -833,9 +833,9 @@ class LookingGlass extends St.BoxLayout {
Main.uiGroup.add_actor(this); Main.uiGroup.add_actor(this);
Main.uiGroup.set_child_below_sibling(this, Main.uiGroup.set_child_below_sibling(this,
Main.layoutManager.panelBox); Main.layoutManager.panelBox);
Main.layoutManager.panelBox.connect('allocation-changed', Main.layoutManager.panelBox.connect('notify::allocation',
this._queueResize.bind(this)); this._queueResize.bind(this));
Main.layoutManager.keyboardBox.connect('allocation-changed', Main.layoutManager.keyboardBox.connect('notify::allocation',
this._queueResize.bind(this)); this._queueResize.bind(this));
this._objInspector = new ObjInspector(this); this._objInspector = new ObjInspector(this);