After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 645625 - Tray icons disappears when the last window is closed
Tray icons disappears when the last window is closed
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-03-23 20:45 UTC by Giovanni Campagna
Modified: 2011-03-23 22:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
NotificationDaemon: fix typo in dealing with TrayIcon (1.10 KB, patch)
2011-03-23 20:53 UTC, Giovanni Campagna
reviewed Details | Review
NotificationDaemon: fix typo in dealing with TrayIcon (1.63 KB, patch)
2011-03-23 21:13 UTC, Giovanni Campagna
none Details | Review
NotificationDaemon: fix typo in dealing with TrayIcon (1.63 KB, patch)
2011-03-23 21:16 UTC, Giovanni Campagna
reviewed Details | Review
NotificationDaemon: fix typo in dealing with TrayIcon (1.72 KB, patch)
2011-03-23 21:47 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2011-03-23 20:45:03 UTC
NotificationDaemon.Source incorrectly reacts to state changes of the associated ShellApp. Patch follows.
Comment 1 Giovanni Campagna 2011-03-23 20:53:22 UTC
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 2 Dan Winship 2011-03-23 20:59:08 UTC
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.
Comment 3 Giovanni Campagna 2011-03-23 21:13:13 UTC
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.
Comment 4 Giovanni Campagna 2011-03-23 21:16:29 UTC
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.
Comment 5 Marina Zhurakhinskaya 2011-03-23 21:43:20 UTC
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.
Comment 6 Giovanni Campagna 2011-03-23 21:47:52 UTC
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.
Comment 7 Marina Zhurakhinskaya 2011-03-23 21:53:29 UTC
Review of attachment 184176 [details] [review]:

Please commit once you have the permission from the release team to do so.
Comment 8 Giovanni Campagna 2011-03-23 22:00:51 UTC
Attachment 184176 [details] pushed as 9530048 - NotificationDaemon: fix typo in dealing with TrayIcon