547cbf
From f180a53d7e216e47feceb388f5663cab9e5f8b2c Mon Sep 17 00:00:00 2001
547cbf
From: Will Thompson <will@willthompson.co.uk>
547cbf
Date: Tue, 25 Sep 2018 18:01:36 +0100
547cbf
Subject: [PATCH 1/6] endSessionDialog: squash "reference to undefined
547cbf
 property" warning
547cbf
547cbf
dialogContent is set to one of the elements of the list DialogContent,
547cbf
but not all of those have a checkBoxText property. When logging out (as
547cbf
opposed to shutting down), this causes a warning:
547cbf
547cbf
    JS WARNING: [resource:///org/gnome/shell/ui/endSessionDialog.js
547cbf
    763]: reference to undefined property "checkBoxText"
547cbf
547cbf
(The line number corresponds to this line in 3.28.3.)
547cbf
547cbf
The warning is apparently not triggered if the undefined property is
547cbf
used as part of a boolean expression:
547cbf
547cbf
    gjs> var x = {};
547cbf
    gjs> x.a;
547cbf
    typein:2:1 strict warning: reference to undefined property "a"
547cbf
    gjs> if (x.b) { log('oh no'); }
547cbf
    gjs> x.c || ''
547cbf
    ""
547cbf
_setCheckBoxLabel() just checks the truthiness of its 'text' argument,
547cbf
and the empty string is false-y, so passing '' rather than undefined has
547cbf
no functional effect.
547cbf
---
547cbf
 js/ui/endSessionDialog.js | 2 +-
547cbf
 1 file changed, 1 insertion(+), 1 deletion(-)
547cbf
547cbf
diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js
547cbf
index 7d18d0b79..07c954139 100644
547cbf
--- a/js/ui/endSessionDialog.js
547cbf
+++ b/js/ui/endSessionDialog.js
547cbf
@@ -760,7 +760,7 @@ var EndSessionDialog = new Lang.Class({
547cbf
         let updatePrepared = this._pkOfflineProxy.UpdatePrepared;
547cbf
         let updatesAllowed = this._updatesPermission && this._updatesPermission.allowed;
547cbf
 
547cbf
-        _setCheckBoxLabel(this._checkBox, dialogContent.checkBoxText);
547cbf
+        _setCheckBoxLabel(this._checkBox, dialogContent.checkBoxText || '');
547cbf
         this._checkBox.actor.visible = (dialogContent.checkBoxText && updatePrepared && updatesAllowed);
547cbf
         this._checkBox.actor.checked = (updatePrepared && updateTriggered);
547cbf
 
547cbf
-- 
547cbf
2.26.2
547cbf
547cbf
547cbf
From 69ac413ad3154df50a8c5212420490c1958ef5d8 Mon Sep 17 00:00:00 2001
547cbf
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
547cbf
Date: Thu, 23 May 2019 06:12:56 +0200
547cbf
Subject: [PATCH 2/6] realmd: Set login format to null on start and update if
547cbf
 invalid
547cbf
547cbf
We were checking an undefined property but that would lead to a a warning.
547cbf
Instead we can consider the login format unset until is null, and in case
547cbf
update it.
547cbf
547cbf
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
547cbf
---
547cbf
 js/gdm/realmd.js | 3 ++-
547cbf
 1 file changed, 2 insertions(+), 1 deletion(-)
547cbf
547cbf
diff --git a/js/gdm/realmd.js b/js/gdm/realmd.js
547cbf
index 9aa27d928..c3a35ea48 100644
547cbf
--- a/js/gdm/realmd.js
547cbf
+++ b/js/gdm/realmd.js
547cbf
@@ -68,6 +68,7 @@ var Manager = new Lang.Class({
547cbf
                                            '/org/freedesktop/realmd',
547cbf
                                            this._reloadRealms.bind(this))
547cbf
         this._realms = {};
547cbf
+        this._loginFormat = null;
547cbf
 
547cbf
         this._signalId = this._aggregateProvider.connect('g-properties-changed',
547cbf
             (proxy, properties) => {
547cbf
@@ -133,7 +134,7 @@ var Manager = new Lang.Class({
547cbf
     },
547cbf
 
547cbf
     get loginFormat() {
547cbf
-        if (this._loginFormat !== undefined)
547cbf
+        if (this._loginFormat)
547cbf
             return this._loginFormat;
547cbf
 
547cbf
         this._updateLoginFormat();
547cbf
-- 
547cbf
2.26.2
547cbf
547cbf
547cbf
From de54695614cd1803b0d7b2371e72867a79bebba2 Mon Sep 17 00:00:00 2001
547cbf
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
547cbf
Date: Tue, 9 Jun 2020 19:42:21 +0200
547cbf
Subject: [PATCH 3/6] popupMenu: Guard against non-menu-item children
547cbf
547cbf
This avoid a harmless but annoying warning.
547cbf
---
547cbf
 js/ui/popupMenu.js | 3 ++-
547cbf
 1 file changed, 2 insertions(+), 1 deletion(-)
547cbf
547cbf
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
547cbf
index 83194d72b..39ba93d8d 100644
547cbf
--- a/js/ui/popupMenu.js
547cbf
+++ b/js/ui/popupMenu.js
547cbf
@@ -714,7 +714,8 @@ var PopupMenuBase = new Lang.Class({
547cbf
     },
547cbf
 
547cbf
     _getMenuItems() {
547cbf
-        return this.box.get_children().map(a => a._delegate).filter(item => {
547cbf
+        const children = this.box.get_children().filter(a => a._delegate !== undefined);
547cbf
+        return children.map(a => a._delegate).filter(item => {
547cbf
             return item instanceof PopupBaseMenuItem || item instanceof PopupMenuSection;
547cbf
         });
547cbf
     },
547cbf
-- 
547cbf
2.26.2
547cbf
547cbf
547cbf
From 048889621dc751a9b2df00ddc009a945b97e0ec5 Mon Sep 17 00:00:00 2001
547cbf
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
547cbf
Date: Tue, 9 Jun 2020 19:48:06 +0200
547cbf
Subject: [PATCH 4/6] st/shadow: Check pipeline when painting
547cbf
547cbf
We shouldn't simply assume that st_shadow_helper_update() has been
547cbf
called before paint() or that the pipeline was created successfully.
547cbf
---
547cbf
 src/st/st-shadow.c | 9 +++++----
547cbf
 1 file changed, 5 insertions(+), 4 deletions(-)
547cbf
547cbf
diff --git a/src/st/st-shadow.c b/src/st/st-shadow.c
547cbf
index 73aa1a3a2..880f7dc7b 100644
547cbf
--- a/src/st/st-shadow.c
547cbf
+++ b/src/st/st-shadow.c
547cbf
@@ -287,8 +287,9 @@ st_shadow_helper_paint (StShadowHelper  *helper,
547cbf
                         ClutterActorBox *actor_box,
547cbf
                         guint8           paint_opacity)
547cbf
 {
547cbf
-  _st_paint_shadow_with_opacity (helper->shadow,
547cbf
-                                 helper->pipeline,
547cbf
-                                 actor_box,
547cbf
-                                 paint_opacity);
547cbf
+  if (helper->pipeline != NULL)
547cbf
+    _st_paint_shadow_with_opacity (helper->shadow,
547cbf
+                                   helper->pipeline,
547cbf
+                                   actor_box,
547cbf
+                                   paint_opacity);
547cbf
 }
547cbf
-- 
547cbf
2.26.2
547cbf
547cbf
547cbf
From 6828a66377c1ac229f901519f7079e7f874ebe25 Mon Sep 17 00:00:00 2001
547cbf
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
547cbf
Date: Mon, 22 Jun 2020 18:37:14 +0200
547cbf
Subject: [PATCH 5/6] ibusManager: Work around annotation shortcoming
547cbf
547cbf
The callback parameter isn't marked as optional, so make sure to
547cbf
always pass a callback (even if it ends up not doing anything).
547cbf
---
547cbf
 js/misc/ibusManager.js | 7 +++++--
547cbf
 1 file changed, 5 insertions(+), 2 deletions(-)
547cbf
547cbf
diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js
547cbf
index e6d4b5aec..8703593b7 100644
547cbf
--- a/js/misc/ibusManager.js
547cbf
+++ b/js/misc/ibusManager.js
547cbf
@@ -210,8 +210,11 @@ var IBusManager = new Lang.Class({
547cbf
             return;
547cbf
         }
547cbf
 
547cbf
-        this._ibus.set_global_engine_async(id, this._MAX_INPUT_SOURCE_ACTIVATION_TIME,
547cbf
-                                           null, callback);
547cbf
+        this._ibus.set_global_engine_async(id,
547cbf
+            this._MAX_INPUT_SOURCE_ACTIVATION_TIME, null, () => {
547cbf
+                if (callback)
547cbf
+                    callback();
547cbf
+            });
547cbf
     },
547cbf
 
547cbf
     preloadEngines(ids) {
547cbf
-- 
547cbf
2.26.2
547cbf
547cbf
547cbf
From b861ec68779258c8b6f555f4acc2b045e179f8d6 Mon Sep 17 00:00:00 2001
547cbf
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
547cbf
Date: Wed, 25 Apr 2018 22:03:16 +0200
547cbf
Subject: [PATCH 6/6] workspaceThumbnail: Initialize signal handler ids to 0
547cbf
547cbf
They are used in conditions, so initialize them first.
547cbf
---
547cbf
 js/ui/workspaceThumbnail.js | 5 +++++
547cbf
 1 file changed, 5 insertions(+)
547cbf
547cbf
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
547cbf
index 381169ea6..82686e68f 100644
547cbf
--- a/js/ui/workspaceThumbnail.js
547cbf
+++ b/js/ui/workspaceThumbnail.js
547cbf
@@ -678,6 +678,11 @@ var ThumbnailsBox = new Lang.Class({
547cbf
             this._updateSwitcherVisibility.bind(this));
547cbf
 
547cbf
         Main.layoutManager.connect('monitors-changed', this._rebuildThumbnails.bind(this));
547cbf
+
547cbf
+        this._switchWorkspaceNotifyId = 0;
547cbf
+        this._nWorkspacesNotifyId = 0;
547cbf
+        this._syncStackingId = 0;
547cbf
+        this._workareasChangedId = 0;
547cbf
     },
547cbf
 
547cbf
     _updateSwitcherVisibility() {
547cbf
-- 
547cbf
2.26.2
547cbf