[gnome-shell] js: Listen to notify::allocation instead of allocation-changed
- From: verdre <jonasd src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] js: Listen to notify::allocation instead of allocation-changed
- Date: Wed, 20 May 2020 13:25:58 +0000 (UTC)
commit faaed642a79a99b5e0f6f3825a7af9bd1d0c1de9
Author: Jonas Dreßler <verdre v0yd nl>
Date: Sat May 9 21:37:18 2020 +0200
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
js/ui/barLevel.js | 4 ++--
js/ui/layout.js | 2 +-
js/ui/lookingGlass.js | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/barLevel.js b/js/ui/barLevel.js
index a2888aaf26..f4fdb6e51a 100644
--- a/js/ui/barLevel.js
+++ b/js/ui/barLevel.js
@@ -30,8 +30,8 @@ var BarLevel = GObject.registerClass({
accessible_role: Atk.Role.LEVEL_BAR,
};
super._init(Object.assign(defaultParams, params));
- this.connect('allocation-changed', (actor, box) => {
- this._barLevelWidth = box.get_width();
+ this.connect('notify::allocation', () => {
+ this._barLevelWidth = this.allocation.get_width();
});
this._customAccessible = St.GenericAccessible.new_for_actor(this);
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 53a55c7705..9013aa97bd 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -246,7 +246,7 @@ var LayoutManager = GObject.registerClass({
vertical: true });
this.addChrome(this.panelBox, { affectsStruts: true,
trackFullscreen: true });
- this.panelBox.connect('allocation-changed',
+ this.panelBox.connect('notify::allocation',
this._panelBoxChanged.bind(this));
this.modalDialogGroup = new St.Widget({ name: 'modalDialogGroup',
diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js
index ac6d41dd5a..a5d762987c 100644
--- a/js/ui/lookingGlass.js
+++ b/js/ui/lookingGlass.js
@@ -833,9 +833,9 @@ class LookingGlass extends St.BoxLayout {
Main.uiGroup.add_actor(this);
Main.uiGroup.set_child_below_sibling(this,
Main.layoutManager.panelBox);
- Main.layoutManager.panelBox.connect('allocation-changed',
+ Main.layoutManager.panelBox.connect('notify::allocation',
this._queueResize.bind(this));
- Main.layoutManager.keyboardBox.connect('allocation-changed',
+ Main.layoutManager.keyboardBox.connect('notify::allocation',
this._queueResize.bind(this));
this._objInspector = new ObjInspector(this);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]