layoutManager: Subclass GObject.Object

LayoutManager is currently a pure JavaScript class that
relies on the rudimentary Signals.addSignalMethods() to
handle signals. This is an inefficient implementation of
one of the most central classes in GNOME Shell.

In addition to removing Shell.GenericContainer, then,
turn LayoutManager into a proper GObject.Object subclass.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/153
This commit is contained in:
Georges Basile Stavracas Neto 2018-08-21 07:13:30 -03:00
parent f4682748fa
commit dd225713a1
No known key found for this signature in database
GPG Key ID: 886C17EE170D1385

View File

@ -177,8 +177,16 @@ const defaultParams = {
var LayoutManager = new Lang.Class({
Name: 'LayoutManager',
Extends: GObject.Object,
Signals: { 'hot-corners-changed': {},
'startup-complete': {},
'startup-prepared': {},
'monitors-changed': {},
'keyboard-visible-changed': { param_types: [GObject.TYPE_BOOLEAN] } },
_init() {
this.parent();
this._rtl = (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL);
this.monitors = [];
this.primaryMonitor = null;
@ -1069,7 +1077,6 @@ var LayoutManager = new Lang.Class({
this._queueUpdateRegions();
},
});
Signals.addSignalMethods(LayoutManager.prototype);
// HotCorner: