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
This commit is contained in:
Florian Müllner 2019-07-22 20:37:33 +02:00
parent 2743f18af4
commit 2653402c5c
5 changed files with 8 additions and 1 deletions

View File

@ -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;
});
}

View File

@ -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;
});
});

View File

@ -768,6 +768,7 @@ var IconGrid = GObject.registerClass({
for (let i in this._items) {
this._items[i].icon.setIconSize(newIconSize);
}
return GLib.SOURCE_REMOVE;
}
});

View File

@ -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() {

View File

@ -1324,6 +1324,7 @@ var ScreenShield = class {
return;
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
this.lock(false);
return GLib.SOURCE_REMOVE;
});
}
};