diff options
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); |