Remove source icon when a corresponding window is activated
Source icons are no longer needed to inform the user about events having occured in a particular application when (s)he activates the window - treat that case just as if the user had clicked the source icon. https://bugzilla.gnome.org/show_bug.cgi?id=610494
This commit is contained in:
@ -100,6 +100,9 @@ NotificationDaemon.prototype = {
|
||||
Lang.bind(this, this._lostName));
|
||||
|
||||
this._currentNotifications = {};
|
||||
|
||||
Shell.WindowTracker.get_default().connect('notify::focus-app',
|
||||
Lang.bind(this, this._onFocusAppChanged));
|
||||
},
|
||||
|
||||
_acquiredName: function() {
|
||||
@ -260,6 +263,10 @@ NotificationDaemon.prototype = {
|
||||
];
|
||||
},
|
||||
|
||||
_onFocusAppChanged: function(tracker) {
|
||||
Main.messageTray.removeSourceByApp(tracker.focus_app);
|
||||
},
|
||||
|
||||
_actionInvoked: function(notification, action, source, id) {
|
||||
this._emitActionInvoked(id, action);
|
||||
source.destroy();
|
||||
|
Reference in New Issue
Block a user