summaryrefslogtreecommitdiff
path: root/typing-break/drw-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'typing-break/drw-utils.c')
-rw-r--r--typing-break/drw-utils.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/typing-break/drw-utils.c b/typing-break/drw-utils.c
index 0bf27c59..5c28db98 100644
--- a/typing-break/drw-utils.c
+++ b/typing-break/drw-utils.c
@@ -157,14 +157,10 @@ 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);
@@ -222,38 +218,13 @@ set_pixmap_background (GtkWidget *window)
g_object_unref (tile_pixbuf);
-#if GTK_CHECK_VERSION (3, 0, 0)
cr = gdk_cairo_create (gtk_widget_get_window (window));
gdk_cairo_set_source_pixbuf (cr, tmp_pixbuf, 0, 0);
cairo_paint (cr);
-#else
- pixmap = gdk_pixmap_new (gtk_widget_get_window (window),
- width,
- height,
- -1);
-
- gdk_draw_pixbuf (pixmap,
- NULL,
- tmp_pixbuf,
- 0,
- 0,
- 0,
- 0,
- width,
- height,
- GDK_RGB_DITHER_NONE,
- 0,
- 0);
-#endif
g_object_unref (tmp_pixbuf);
-#if GTK_CHECK_VERSION (3, 0, 0)
cairo_destroy (cr);
-#else
- gdk_window_set_back_pixmap (gtk_widget_get_window (window), pixmap, FALSE);
- g_object_unref (pixmap);
-#endif
}
void