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.
This commit is contained in:
parent
a0dcee1b81
commit
3aeadee946
@ -214,8 +214,11 @@ create_bg_pixmap (GdkColormap *colormap,
|
|||||||
GdkPixmap *pixmap = gdk_pixmap_new (gdk_screen_get_root_window (screen),
|
GdkPixmap *pixmap = gdk_pixmap_new (gdk_screen_get_root_window (screen),
|
||||||
1, 1,
|
1, 1,
|
||||||
visual->depth);
|
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,
|
cairo_set_source_rgb (cr,
|
||||||
color->red / 255.,
|
color->red / 255.,
|
||||||
color->green / 255.,
|
color->green / 255.,
|
||||||
|
Loading…
Reference in New Issue
Block a user