diff options
author | infirit <[email protected]> | 2015-07-12 19:44:26 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2015-07-12 19:44:26 +0200 |
commit | 2208d0af94aeb5b68d1209ad2b11cd46c14c8d23 (patch) | |
tree | 50db1b72797858309fec008fc5fdb7f579fb9e05 /typing-break/drw-utils.c | |
parent | fb522992685b334c9b5e56d3eb15f9ba2d0b3acd (diff) | |
download | mate-control-center-2208d0af94aeb5b68d1209ad2b11cd46c14c8d23.tar.bz2 mate-control-center-2208d0af94aeb5b68d1209ad2b11cd46c14c8d23.tar.xz |
Replace Gdk drawing with Cairo
Diffstat (limited to 'typing-break/drw-utils.c')
-rw-r--r-- | typing-break/drw-utils.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/typing-break/drw-utils.c b/typing-break/drw-utils.c index 0bf27c59..f5ed7e3f 100644 --- a/typing-break/drw-utils.c +++ b/typing-break/drw-utils.c @@ -157,14 +157,11 @@ set_pixmap_background (GtkWidget *window) { GdkScreen *screen; GdkPixbuf *tmp_pixbuf, *pixbuf, *tile_pixbuf; -#if GTK_CHECK_VERSION (3, 0, 0) - cairo_t *cr; -#else GdkPixmap *pixmap; -#endif GdkRectangle rect; GdkColor color; gint width, height; + cairo_t *cr; gtk_widget_realize (window); @@ -232,18 +229,10 @@ set_pixmap_background (GtkWidget *window) height, -1); - gdk_draw_pixbuf (pixmap, - NULL, - tmp_pixbuf, - 0, - 0, - 0, - 0, - width, - height, - GDK_RGB_DITHER_NONE, - 0, - 0); + cr = gdk_cairo_create (pixmap); + gdk_cairo_set_source_pixbuf (cr, tmp_pixbuf, 0, 0); + cairo_paint (cr); + cairo_destroy (cr); #endif g_object_unref (tmp_pixbuf); |