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 634820 - Dropbox status icon not displayed in the tray
Dropbox status icon not displayed in the tray
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
2.91.x
Other Linux
: Normal normal
: ---
Assigned To: Dan Winship
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-11-14 14:12 UTC by Cyril Arnaud
Modified: 2011-03-21 15:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Capture screen (697.95 KB, image/png)
2010-11-14 14:12 UTC, Cyril Arnaud
  Details
message-tray: allocate the entire size to the icon (1.30 KB, patch)
2011-03-19 18:04 UTC, Owen Taylor
committed Details | Review

Description Cyril Arnaud 2010-11-14 14:12:52 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).
Comment 1 Dan Winship 2010-11-14 23:20:49 UTC
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?
Comment 2 Cyril Arnaud 2010-11-15 03:27:42 UTC
Yes, it worked perfectly on the gnome-panel systray, but not with gnome-shell.
Comment 3 Cyril Arnaud 2010-11-16 04:39:58 UTC
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
Comment 4 Cyril Arnaud 2010-11-17 13:59:46 UTC
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
Comment 5 Owen Taylor 2011-03-19 18:04:20 UTC
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.
Comment 6 Owen Taylor 2011-03-21 15:18:05 UTC
Attachment 183805 [details] pushed as 96f89ce - message-tray: allocate the entire size to the icon