js: Initialize some properties

Otherwise those can result in the (harmless) "reference to undefined
property" warnings.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/970
This commit is contained in:
Florian Müllner 2020-01-29 17:48:57 +01:00
parent 75905ebd3c
commit 53ac00eabb
2 changed files with 2 additions and 0 deletions

View File

@ -137,6 +137,7 @@ class OverviewActor extends St.BoxLayout {
var Overview = class { var Overview = class {
constructor() { constructor() {
this._initCalled = false; this._initCalled = false;
this._visible = false;
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this)); Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
this._sessionUpdated(); this._sessionUpdated();

View File

@ -166,6 +166,7 @@ class CapsLockWarning extends St.Label {
let seat = Clutter.get_default_backend().get_default_seat(); let seat = Clutter.get_default_backend().get_default_seat();
this._keymap = seat.get_keymap(); this._keymap = seat.get_keymap();
this._stateChangedId = 0;
this.connect('notify::mapped', () => { this.connect('notify::mapped', () => {
if (this.is_mapped()) { if (this.is_mapped()) {