[gnome-shell/gbsneto/remove-generic-container: 10/21] layoutManager: Subclass GObject.Object
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/remove-generic-container: 10/21] layoutManager: Subclass GObject.Object
- Date: Sun, 30 Sep 2018 17:52:11 +0000 (UTC)
commit 0e55ea27231aaacff7f89476b28d21f3c77e01b3
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Aug 21 07:13:30 2018 -0300
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
js/ui/layout.js | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 7504fb6ba..418d4ec66 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -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;
@@ -1068,7 +1076,6 @@ var LayoutManager = new Lang.Class({
this._queueUpdateRegions();
},
});
-Signals.addSignalMethods(LayoutManager.prototype);
// HotCorner:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]