summaryrefslogtreecommitdiff
path: root/src/ui/ui.c
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2010-08-18 03:09:50 +0200
committerThomas Thurman <tthurman@gnome.org>2010-09-15 11:58:29 -0400
commit3608ff90798cbb6c8d88be902abd56f1a4b16bc0 (patch)
tree4ffb446cbf78ea2defea218df7b9837f2509bfd9 /src/ui/ui.c
parent874f55b645d664925b49ee9972cd82dc39287098 (diff)
downloadmetacity-3608ff90798cbb6c8d88be902abd56f1a4b16bc0.tar.gz
metacity-3608ff90798cbb6c8d88be902abd56f1a4b16bc0.tar.bz2
Replace GDK drawing API with cairo
The GDK drawing API was deprecated/removed. https://bugzilla.gnome.org/show_bug.cgi?id=627245
Diffstat (limited to 'src/ui/ui.c')
-rw-r--r--src/ui/ui.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui/ui.c b/src/ui/ui.c
index f15e4bc..960e702 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -558,6 +558,8 @@ meta_image_window_set (MetaImageWindow *iw,
int x,
int y)
{
+ cairo_t *cr;
+
/* We use a back pixmap to avoid having to handle exposes, because
* it's really too slow for large clients being minimized, etc.
* and this way flicker is genuinely zero.
@@ -572,6 +574,10 @@ meta_image_window_set (MetaImageWindow *iw,
gdk_pixbuf_get_height (pixbuf),
GDK_RGB_DITHER_NORMAL,
0, 0);
+ cr = gdk_cairo_create (iw->pixmap);
+ gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
+ cairo_paint (cr);
+ cairo_destroy (cr);
gdk_window_set_back_pixmap (iw->window->window,
iw->pixmap,
@@ -1137,7 +1143,7 @@ meta_ui_get_pixbuf_from_pixmap (Pixmap pmap)
depth = gdk_drawable_get_depth (GDK_DRAWABLE (gpmap));
if (depth <= 24)
- cmap = gdk_screen_get_rgb_colormap (screen);
+ cmap = gdk_screen_get_system_colormap (screen);
else
cmap = gdk_screen_get_rgba_colormap (screen);