Blob Blame History Raw
From f180a53d7e216e47feceb388f5663cab9e5f8b2c Mon Sep 17 00:00:00 2001
From: Will Thompson <will@willthompson.co.uk>
Date: Tue, 25 Sep 2018 18:01:36 +0100
Subject: [PATCH 1/6] endSessionDialog: squash "reference to undefined
 property" warning

dialogContent is set to one of the elements of the list DialogContent,
but not all of those have a checkBoxText property. When logging out (as
opposed to shutting down), this causes a warning:

    JS WARNING: [resource:///org/gnome/shell/ui/endSessionDialog.js
    763]: reference to undefined property "checkBoxText"

(The line number corresponds to this line in 3.28.3.)

The warning is apparently not triggered if the undefined property is
used as part of a boolean expression:

    gjs> var x = {};
    gjs> x.a;
    typein:2:1 strict warning: reference to undefined property "a"
    gjs> if (x.b) { log('oh no'); }
    gjs> x.c || ''
    ""
_setCheckBoxLabel() just checks the truthiness of its 'text' argument,
and the empty string is false-y, so passing '' rather than undefined has
no functional effect.
---
 js/ui/endSessionDialog.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js
index 7d18d0b79..07c954139 100644
--- a/js/ui/endSessionDialog.js
+++ b/js/ui/endSessionDialog.js
@@ -760,7 +760,7 @@ var EndSessionDialog = new Lang.Class({
         let updatePrepared = this._pkOfflineProxy.UpdatePrepared;
         let updatesAllowed = this._updatesPermission && this._updatesPermission.allowed;
 
-        _setCheckBoxLabel(this._checkBox, dialogContent.checkBoxText);
+        _setCheckBoxLabel(this._checkBox, dialogContent.checkBoxText || '');
         this._checkBox.actor.visible = (dialogContent.checkBoxText && updatePrepared && updatesAllowed);
         this._checkBox.actor.checked = (updatePrepared && updateTriggered);
 
-- 
2.26.2


From 69ac413ad3154df50a8c5212420490c1958ef5d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Thu, 23 May 2019 06:12:56 +0200
Subject: [PATCH 2/6] realmd: Set login format to null on start and update if
 invalid

We were checking an undefined property but that would lead to a a warning.
Instead we can consider the login format unset until is null, and in case
update it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700
---
 js/gdm/realmd.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/js/gdm/realmd.js b/js/gdm/realmd.js
index 9aa27d928..c3a35ea48 100644
--- a/js/gdm/realmd.js
+++ b/js/gdm/realmd.js
@@ -68,6 +68,7 @@ var Manager = new Lang.Class({
                                            '/org/freedesktop/realmd',
                                            this._reloadRealms.bind(this))
         this._realms = {};
+        this._loginFormat = null;
 
         this._signalId = this._aggregateProvider.connect('g-properties-changed',
             (proxy, properties) => {
@@ -133,7 +134,7 @@ var Manager = new Lang.Class({
     },
 
     get loginFormat() {
-        if (this._loginFormat !== undefined)
+        if (this._loginFormat)
             return this._loginFormat;
 
         this._updateLoginFormat();
-- 
2.26.2


From de54695614cd1803b0d7b2371e72867a79bebba2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Tue, 9 Jun 2020 19:42:21 +0200
Subject: [PATCH 3/6] popupMenu: Guard against non-menu-item children

This avoid a harmless but annoying warning.
---
 js/ui/popupMenu.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 83194d72b..39ba93d8d 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -714,7 +714,8 @@ var PopupMenuBase = new Lang.Class({
     },
 
     _getMenuItems() {
-        return this.box.get_children().map(a => a._delegate).filter(item => {
+        const children = this.box.get_children().filter(a => a._delegate !== undefined);
+        return children.map(a => a._delegate).filter(item => {
             return item instanceof PopupBaseMenuItem || item instanceof PopupMenuSection;
         });
     },
-- 
2.26.2


From 048889621dc751a9b2df00ddc009a945b97e0ec5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Tue, 9 Jun 2020 19:48:06 +0200
Subject: [PATCH 4/6] st/shadow: Check pipeline when painting

We shouldn't simply assume that st_shadow_helper_update() has been
called before paint() or that the pipeline was created successfully.
---
 src/st/st-shadow.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/st/st-shadow.c b/src/st/st-shadow.c
index 73aa1a3a2..880f7dc7b 100644
--- a/src/st/st-shadow.c
+++ b/src/st/st-shadow.c
@@ -287,8 +287,9 @@ st_shadow_helper_paint (StShadowHelper  *helper,
                         ClutterActorBox *actor_box,
                         guint8           paint_opacity)
 {
-  _st_paint_shadow_with_opacity (helper->shadow,
-                                 helper->pipeline,
-                                 actor_box,
-                                 paint_opacity);
+  if (helper->pipeline != NULL)
+    _st_paint_shadow_with_opacity (helper->shadow,
+                                   helper->pipeline,
+                                   actor_box,
+                                   paint_opacity);
 }
-- 
2.26.2


From 6828a66377c1ac229f901519f7079e7f874ebe25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Mon, 22 Jun 2020 18:37:14 +0200
Subject: [PATCH 5/6] ibusManager: Work around annotation shortcoming

The callback parameter isn't marked as optional, so make sure to
always pass a callback (even if it ends up not doing anything).
---
 js/misc/ibusManager.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js
index e6d4b5aec..8703593b7 100644
--- a/js/misc/ibusManager.js
+++ b/js/misc/ibusManager.js
@@ -210,8 +210,11 @@ var IBusManager = new Lang.Class({
             return;
         }
 
-        this._ibus.set_global_engine_async(id, this._MAX_INPUT_SOURCE_ACTIVATION_TIME,
-                                           null, callback);
+        this._ibus.set_global_engine_async(id,
+            this._MAX_INPUT_SOURCE_ACTIVATION_TIME, null, () => {
+                if (callback)
+                    callback();
+            });
     },
 
     preloadEngines(ids) {
-- 
2.26.2


From b861ec68779258c8b6f555f4acc2b045e179f8d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Wed, 25 Apr 2018 22:03:16 +0200
Subject: [PATCH 6/6] workspaceThumbnail: Initialize signal handler ids to 0

They are used in conditions, so initialize them first.
---
 js/ui/workspaceThumbnail.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 381169ea6..82686e68f 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -678,6 +678,11 @@ var ThumbnailsBox = new Lang.Class({
             this._updateSwitcherVisibility.bind(this));
 
         Main.layoutManager.connect('monitors-changed', this._rebuildThumbnails.bind(this));
+
+        this._switchWorkspaceNotifyId = 0;
+        this._nWorkspacesNotifyId = 0;
+        this._syncStackingId = 0;
+        this._workareasChangedId = 0;
     },
 
     _updateSwitcherVisibility() {
-- 
2.26.2