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 157303 - pixmap background for panel applets doesn't seem to work right.
pixmap background for panel applets doesn't seem to work right.
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: libpanel-applet
git master
Other All
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks: 108124
 
 
Reported: 2004-11-04 02:23 UTC by James Henstridge
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: 2.10.0
GNOME version: 2.9/2.10


Attachments
gnome-panel-applet-background.patch (1.78 KB, patch)
2004-11-04 02:24 UTC, James Henstridge
none Details | Review
panel-background-sync.patch (817 bytes, patch)
2004-11-05 03:01 UTC, James Henstridge
accepted-commit_now Details | Review

Description James Henstridge 2004-11-04 02:23:24 UTC
If I change the panel background to a pixmap (either by choosing a background
image, or a semi-transparent colour), I get warnings like the following quite often:

** (trashapplet:3101): CRITICAL **: panel_applet_get_pixmap: assertion `pixmap
!= NULL' failed

** (trashapplet:3101): WARNING **: Failed to get pixmap 12616677,1250,0

When this happens, libpanel-applet tells the applet to display as
PANEL_NO_BACKGROUND since it fails to find the pixmap ID.

When I moved the code for emitting "change-background" to an idle function,
rather than performing it directly in the Bonobo::PropertyBag set_prop handler,
the problem went away.  This patch is attached to the bug report.

Does this sound like the right way to fix the problem, or is it just masking a
problem in gnome-panel?
Comment 1 James Henstridge 2004-11-04 02:24:18 UTC
Created attachment 33412 [details] [review]
gnome-panel-applet-background.patch
Comment 2 Danielle Madeley 2004-11-04 06:46:05 UTC
This really needs to be resolved for 2.10, it's been a problem for too long.
Comment 3 James Henstridge 2004-11-04 09:06:24 UTC
After a bit more testing, it seems that my patch doesn't fix the problem but
just reduces its occurence a lot.

This indicates that it is probably a timing issue.
Comment 4 Vincent Untz 2004-11-04 15:24:25 UTC
See also bug #128167
Comment 5 James Henstridge 2004-11-05 03:01:06 UTC
Created attachment 33452 [details] [review]
panel-background-sync.patch

New patch that probably fixes the real problem.

My previous patch just masked the problem by introducing a bit of a delay
between the applet receiving the background change notification and actually
processing it.

The real problem is that not all of the X commands the panel used to draw the
panel background had been processed before the panel told the applets about the
new background.  This patch adds a gdk_display_sync() call to the end of
panel_background_prepare(), so that once the background is prepared, it is safe
to notify the applets.
Comment 6 Vincent Untz 2004-11-05 07:56:05 UTC
Makes sense.
Wouldn't it be better to just sync when we're using a pixmap for the background
(in set_pixbuf_background, e.g.)?
Comment 7 James Henstridge 2004-11-05 08:10:44 UTC
Possibly.  It doesn't have any noticable effect with a solid background though.

Mark: does this patch look okay?
Comment 8 Vincent Untz 2004-11-06 16:28:43 UTC
Comment on attachment 33452 [details] [review]
panel-background-sync.patch

Ok for me.
Comment 9 James Henstridge 2004-11-08 04:30:26 UTC
Checked in on head.