GNOME Bugzilla – Bug 128567
Drawer not updated always on bottom panels.
Last modified: 2005-08-15 01:49:42 UTC
Have a drawer on a bottom panel, with a couple of launchers already in it. Now drop another launcher on the drawer. Notice that the drawer is not updated. You will feel you lost the launcher, but wait, drag the drawer to a top panel, click on the drawer, you will find the launcher back.
When a launcher is added to the drawer, panel_applet_register () is called which tries to add the applet to the panel. In panel_applet_register () there is a piece of code like: if (panel_widget_add (panel, applet, locked, pos, insert_at_pos) == -1) { GSList *l; for (l = panels; l; l = l->next) if (panel_widget_add (panel, applet, locked, 0, TRUE) != -1) break; ................ panel = PANEL_WIDGET (l->data); } Now if the applet cannot be added to the specified position the panel list is traversed to find an empty position (in fact the applet will never get added to other panels as the panel data is never changed). Here the panel data is changed after the applet is added to the panel, and the orientation of the applet is being changed based on this data. If the orientation is different from the panel to which the applet is added there won't be proper scaling of the applet and the drawer, hence the launcher will not be visible. Note: This bug is also reproducible on top panel.
Created attachment 22289 [details] [review] patch which fixes the bug
Mark: I am not clear what this piece of code does in applet.c (panel_applet_register): for (l = panels; l; l = l->next) if (panel_widget_add (panel, applet, locked, 0, TRUE) != -1) break; if (!l) { g_warning (_("Can't find an empty spot")); panel_profile_delete_object (info); return NULL; } panel = PANEL_WIDGET (l->data);
Bumping the priority level to High because a patch is attached.
What a horrible little bug! Thanks for your patch Leena, I've committed a very similar patch. The code you're referring to is just broken, you had fixed it up correctly in your patch. 2004-02-16 Mark McLoughlin <mark@skynet.ie> Resolve the mystery of the disappearing applets. Fix for bug #128567 based on a patch from Leena gunda. * applet.c: (panel_applet_register): if adding at the saved position fails, try adding at the beginning of the panel.