From 002160e52406f74bd75c6ff5b2ad243db8dd2e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 12 Mar 2020 23:23:37 +0100 Subject: [PATCH] main: Unwatch notification proxy name after auto-start We only "watch" the 'org.gnome.Shell.Notifications' name to start the service, not to actually monitor name owner changes; so unwatch the name once that's done. https://gitlab.gnome.org/GNOME/gnome-shell/issues/2381 --- js/ui/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); }