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 556355 - panel applet size hints broken if PANEL_APPLET_HAS_HANDLE not set
panel applet size hints broken if PANEL_APPLET_HAS_HANDLE not set
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: panel
2.20.x
Other All
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-10-15 00:42 UTC by Paul Kuliniewicz
Modified: 2011-02-03 18:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Test case that reproduces the bug (1.10 KB, text/plain)
2008-10-15 00:45 UTC, Paul Kuliniewicz
Details

Description Paul Kuliniewicz 2008-10-15 00:42:56 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.
Comment 1 Paul Kuliniewicz 2008-10-15 00:45:15 UTC
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.
Comment 2 andrejx 2010-11-03 10:37:17 UTC
I would also like to see this bug fixed. It would be crucial for my applet.
Comment 3 Vincent Untz 2011-02-03 18:43:05 UTC
Not sure why I never saw this mail, but it's fixed in 2.32, even when using the bonobo compatibility module.