diff --git a/js/ui/main.js b/js/ui/main.js index 3d921409f..b29360423 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -142,8 +142,10 @@ function start() { shellDBusService = new ShellDBus.GnomeShell(); shellMountOpDBusService = new ShellMountOperation.GnomeShellMountOpHandler(); - Gio.DBus.session.watch_name('org.gnome.Shell.Notifications', - Gio.BusNameWatcherFlags.AUTO_START, null, null); + const watchId = Gio.DBus.session.watch_name('org.gnome.Shell.Notifications', + Gio.BusNameWatcherFlags.AUTO_START, + bus => bus.unwatch_name(watchId), + bus => bus.unwatch_name(watchId)); _sessionUpdated(); }