[gnome-shell] main: Unwatch notification proxy name after auto-start



commit 002160e52406f74bd75c6ff5b2ad243db8dd2e73
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Mar 12 23:23:37 2020 +0100

    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 3d921409f6..b293604239 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();
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]