background: Do not queue idle when cancelled
A cancelled cancellable means that the background was destroyed, so we shouldn't queue an idle or emit the 'loaded' signal anymore. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5337 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2268>
This commit is contained in:
parent
dd28832dcd
commit
ef74f922d6
@ -333,6 +333,8 @@ var Background = GObject.registerClass({
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this.isLoaded = true;
|
this.isLoaded = true;
|
||||||
|
if (this._cancellable?.is_cancelled())
|
||||||
|
return;
|
||||||
|
|
||||||
let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
|
let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
|
||||||
this.emit('loaded');
|
this.emit('loaded');
|
||||||
|
Loading…
Reference in New Issue
Block a user