GNOME Bugzilla – Bug 634820
Dropbox status icon not displayed in the tray
Last modified: 2011-03-21 15:18:09 UTC
Created attachment 174437 [details] Capture screen When I launch dropbox everything works, except for the status icon. I can't access the menus you usually access by clicking on the status icon (left or right click on the icon placeholder is not working). As you can see on the screen caprure attached there is a place holder for the icon (I sarted shutter after dropbox and you can clearly see the space between dropbox and shutter as a placeholder).
there's one cyan-ish pixel there where the icon should be... probably dropbox is behaving pathologically in some way with respect to size negotiation, and it worked right with the old panel systray but not with the shell trayicon code?
Yes, it worked perfectly on the gnome-panel systray, but not with gnome-shell.
Additional detail : if dropbox is started before gnome-shell then the status icon is displayed properly. If dropbox is stopped and started while gnome-shell is still "on" then the status icon is not displayed. Restarting gnome-shell doesn't change a thing. Then switching to metacity the dropbox status icon is displayed properly on the gnome-panel, then switching back to gnome-shell : the dropbox status icon is displayed properly on the tray. I am lost
It really seems to be related to the size of the icon. In the status icon placeholder we can see a blue pixel. clicking just above this pixel allow me to access the dropbox menu and/or the dropbox folder. So the status icon works, but the size seems to be a 1x1 px
Created attachment 183805 [details] [review] message-tray: allocate the entire size to the icon Currently, we are not setting status icons embedded icons in the tray to fill. The program I was testing with, GnomeActivityJournal, uses a GtkStatusIcon with GdkPixbuf contents, initially empty, then filled in with a 48x48 contents. Depending on race conditions, I'd see a couple of different scenarios, we could have a failure like: Icon shows up empty Shell allocates it 1x1 Icon is filled in Icon requests 48x48 Shell allocates at 24x24 Icon gets 1x1 allocation Icon requests 1x1 Shell allocates at 1x1 Or "success" like: Icon shows up empty Shell allocates it 1x1 Icon is filled in Icon requests 48x48 Shell allocates at 24x24 Icon gets 1x1 allocation Icon gets 24x24 allocation Icon requests 24x24 Shell allocates at 24x24 This patch changes it so that we allocate icons at 24x24 without regard to the requisition. The two possible questions: * Do whether we want to specify fill only for status icons or for all notification icons. It seems harmless to fill for all icons, but maybe it would cause something to be inappropriately scaled up? * The theoretical thing we should be is allocating the icon at 24 pixels high always but at whatever width it requests. This is bug 634707. It's probably not that hard to get the behavior - setting only the width on the StBin and not the height for the status icon case would probably get us there. We'd need to complicate the JS code a bit to distinguish the two cases and someone would have to test with a range of status icons. ==== Specify x-fill and y-fill true for the bin that contains the status icon so the status icon will always be sized to our specified icon size (24x24). This prevents pathological behavior for legacy status icons embedded in the tray where an initial allocation at 1x1 before they had content would "stick", and the icon would permanently end up 1x1.
Attachment 183805 [details] pushed as 96f89ce - message-tray: allocate the entire size to the icon