[gnome-shell] js: Add missing return values to later_add() handlers



commit 2653402c5c2b3e92ab4e2d834e75715f0df006d4
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Jul 22 20:37:33 2019 +0200

    js: Add missing return values to later_add() handlers
    
    meta_later_add() is modelled after g_idle_add() and friends, and
    the handler's boolean return value determines whether it should
    be scheduled again or removed. There are some places where we omit
    the return value, add them (although the implicit return value of
    "undefined" already gives us the intended result).
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/637

 js/ui/appDisplay.js           | 1 +
 js/ui/audioDeviceSelection.js | 1 +
 js/ui/iconGrid.js             | 1 +
 js/ui/lookingGlass.js         | 5 ++++-
 js/ui/screenShield.js         | 1 +
 5 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 60322f81a..8bfdd1707 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -622,6 +622,7 @@ var AllView = class AllView extends BaseAppView {
                 this._grid.currentPage = 0;
                 this._pageIndicators.setNPages(this._grid.nPages());
                 this._pageIndicators.setCurrentPage(0);
+                return GLib.SOURCE_REMOVE;
             });
         }
 
diff --git a/js/ui/audioDeviceSelection.js b/js/ui/audioDeviceSelection.js
index 1b6522680..d66970482 100644
--- a/js/ui/audioDeviceSelection.js
+++ b/js/ui/audioDeviceSelection.js
@@ -85,6 +85,7 @@ var AudioDeviceSelectionDialog = GObject.registerClass({
         box.connect('notify::height', () => {
             Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
                 box.width = box.height;
+                return GLib.SOURCE_REMOVE;
             });
         });
 
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index 9a6ddc586..17ca0a98d 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -768,6 +768,7 @@ var IconGrid = GObject.registerClass({
         for (let i in this._items) {
             this._items[i].icon.setIconSize(newIconSize);
         }
+        return GLib.SOURCE_REMOVE;
     }
 });
 
diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js
index 4a6a80abd..926f50adc 100644
--- a/js/ui/lookingGlass.js
+++ b/js/ui/lookingGlass.js
@@ -1011,7 +1011,10 @@ var LookingGlass = class LookingGlass {
     }
 
     _queueResize() {
-        Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => this._resize());
+        Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
+            this._resize();
+            return GLib.SOURCE_REMOVE;
+        });
     }
 
     _resize() {
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 8f4a65d04..9e07b5901 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -1324,6 +1324,7 @@ var ScreenShield = class {
             return;
         Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
             this.lock(false);
+            return GLib.SOURCE_REMOVE;
         });
     }
 };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]