GNOME Bugzilla – Bug 645625
Tray icons disappears when the last window is closed
Last modified: 2011-03-23 22:00:54 UTC
NotificationDaemon.Source incorrectly reacts to state changes of the associated ShellApp. Patch follows.
Created attachment 184171 [details] [review] NotificationDaemon: fix typo in dealing with TrayIcon Source was failing to determine if it was a tray icon, destroying itself when the associated application was closed.
Comment on attachment 184171 [details] [review] NotificationDaemon: fix typo in dealing with TrayIcon >- if (!this._isTrayIcon && this.app.get_state() == Shell.AppState.STOPPED) >+ if (!this._trayIcon && this.app.get_state() == Shell.AppState.STOPPED) definitely correct; 7f17fcfa from bug 630842 renamed that variable, but in between when I submitted the patch and when I committed it, c4dad3d2 from bug 642659 added another use of it, and I didn't think to check for that when I committed it.
Created attachment 184173 [details] [review] NotificationDaemon: fix typo in dealing with TrayIcon Source was failing to determine if it was a tray icon, destroying itself when the associated application was closed.
Created attachment 184174 [details] [review] NotificationDaemon: fix typo in dealing with TrayIcon Source was failing to determine if it was a tray icon, destroying itself when the associated application was closed.
Review of attachment 184174 [details] [review]: ::: js/ui/notificationDaemon.js @@ +524,3 @@ + // running the tray icon can still be used + // (it is guaranteed that the X Window associated with the tray icon + // will be destroyed when the application is closed) How is this for a comment? // Destroy notification sources when their apps exit. // The app exiting would normally result in a tray icon being removed, // so the associated source would be destroyed through the code path // that handles the tray icon being removed. We should not destroy // the source associated with a tray icon when the application state // is Shell.AppState.STOPPED because running applications that have // no open windows would also have that state. This is often the case // for applications that use tray icons.
Created attachment 184176 [details] [review] NotificationDaemon: fix typo in dealing with TrayIcon Source was failing to determine if it was a tray icon, destroying itself when the associated application was closed. Updated comment.
Review of attachment 184176 [details] [review]: Please commit once you have the permission from the release team to do so.
Attachment 184176 [details] pushed as 9530048 - NotificationDaemon: fix typo in dealing with TrayIcon