GNOME Bugzilla – Bug 556355
panel applet size hints broken if PANEL_APPLET_HAS_HANDLE not set
Last modified: 2011-02-03 18:43:05 UTC
Please describe the problem: The panel_applet_set_size_hints function only works as expected if the applet has the PANEL_APPLET_HAS_HANDLE. If it doesn't, setting size hints causes the applet not to be displayed at all. (Specifically, the applet gets zero size no matter what, as I explain below.) Steps to reproduce: 1. Create an applet that uses panel_appet_set_size_hints without PANEL_APPLET_HAS_HANDLE -- see attached test case. 2. Add the applet to a panel Actual results: No applet appears in the panel. Expected results: The applet should appear in the panel. Does this happen every time? Yes Other information: The underlying bug appears to be in the panel_applet_frame_set_size_hints_from_any function (gnome-panel/panel-applet-frame.c). In that function, the size_hints array is only populated if frame->priv->has_handle is true. Otherwise, size_hints is left at all zeros. As a result, the applet's size will always be zero, and thus it will never be visible in the panel.
Created attachment 120615 [details] Test case that reproduces the bug Simple applet that reproduces the bug. Define TEST_CASE_OAFIID to be the ID for a factory for an applet you aren't using (I've defaulted it to GEyes). Define TEST_CASE_WITH_HANDLE to see what happens if you do set PANEL_APPLET_HAS_HANDLE: the applet becomes visible.
I would also like to see this bug fixed. It would be crucial for my applet.
Not sure why I never saw this mail, but it's fixed in 2.32, even when using the bonobo compatibility module.