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
This commit is contained in:
Dan Winship 2010-04-07 15:22:08 -04:00
parent 29d89467b9
commit a7cd294403

View File

@ -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) {