[gnome-shell] Set colormap on background pixmaps for a tray icons
- From: Owen Taylor <otaylor src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-shell] Set colormap on background pixmaps for a tray icons
- Date: Sat, 18 Apr 2009 17:15:47 -0400 (EDT)
commit 3aeadee946939e582a936bd2231603347945db8b
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Sat Apr 18 17:09:11 2009 -0400
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.
---
src/shell-tray-manager.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/shell-tray-manager.c b/src/shell-tray-manager.c
index fef819e..45654c9 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.,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]