mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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:
parent
2743f18af4
commit
2653402c5c
5 changed files with 8 additions and 1 deletions
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -768,6 +768,7 @@ var IconGrid = GObject.registerClass({
|
|||
for (let i in this._items) {
|
||||
this._items[i].icon.setIconSize(newIconSize);
|
||||
}
|
||||
return GLib.SOURCE_REMOVE;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -1324,6 +1324,7 @@ var ScreenShield = class {
|
|||
return;
|
||||
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
|
||||
this.lock(false);
|
||||
return GLib.SOURCE_REMOVE;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue