summaryrefslogtreecommitdiff
path: root/src/shell-tray-manager.c
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2009-04-18 17:09:11 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2009-04-18 17:09:11 -0400
commit3aeadee946939e582a936bd2231603347945db8b (patch)
tree26c5e34e39269d565f9b0db221d34b746c6f8763 /src/shell-tray-manager.c
parenta0dcee1b8176d746c1591b1a35b7fc749e522e2d (diff)
Set colormap on background pixmaps for a tray icons
We need to use gdk_drawable_set_colormap() before drawing with cairo on a pixmap; otherwise cairo won't know what colors to use.
Diffstat (limited to 'src/shell-tray-manager.c')
-rw-r--r--src/shell-tray-manager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shell-tray-manager.c b/src/shell-tray-manager.c
index fef819e3..45654c94 100644
--- a/src/shell-tray-manager.c
+++ b/src/shell-tray-manager.c
@@ -214,8 +214,11 @@ create_bg_pixmap (GdkColormap *colormap,
GdkPixmap *pixmap = gdk_pixmap_new (gdk_screen_get_root_window (screen),
1, 1,
visual->depth);
+ cairo_t *cr;
- cairo_t *cr = gdk_cairo_create (pixmap);
+ gdk_drawable_set_colormap (pixmap, colormap);
+
+ cr = gdk_cairo_create (pixmap);
cairo_set_source_rgb (cr,
color->red / 255.,
color->green / 255.,