[gnome-shell] notificationDaemon: fix remove-source-on-app-focus code



commit a7cd29440318be5dcad65bb1cba3cfdd6e07a321
Author: Dan Winship <danw gnome org>
Date:   Wed Apr 7 15:22:08 2010 -0400

    notificationDaemon: fix remove-source-on-app-focus code
    
    Previously when no app was focused it would accidentally remove all
    sources that had no assocated app (such as telepathy-based sources).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=614978

 js/ui/notificationDaemon.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index 1bd57c3..dc8f08d 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -246,7 +246,8 @@ NotificationDaemon.prototype = {
 
     _onFocusAppChanged: function() {
         let tracker = Shell.WindowTracker.get_default();
-        Main.messageTray.removeSourceByApp(tracker.focus_app);
+        if (tracker.focus_app)
+            Main.messageTray.removeSourceByApp(tracker.focus_app);
     },
 
     _actionInvoked: function(notification, action, source, id) {



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