From 105abf2b5f34489bb3a5d62753c32178471379a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= Date: Sun, 23 Apr 2017 09:54:57 +0200 Subject: tile-preview: avoid a deprecation warning Taken from: https://git.gnome.org/browse/metacity/commit/?id=3380502 --- src/ui/tile-preview.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/ui') diff --git a/src/ui/tile-preview.c b/src/ui/tile-preview.c index 7a96e468..88962467 100644 --- a/src/ui/tile-preview.c +++ b/src/ui/tile-preview.c @@ -66,8 +66,12 @@ meta_tile_preview_draw (GtkWidget *widget, } else { + GdkRGBA black = {.0, .0, .0, 1.0}; GdkRGBA white = {1.0, 1.0, 1.0, 1.0}; + gdk_cairo_set_source_rgba (cr, &black); + cairo_paint (cr); + gdk_cairo_set_source_rgba (cr, &white); cairo_rectangle (cr, @@ -207,9 +211,6 @@ meta_tile_preview_show (MetaTilePreview *preview, { cairo_rectangle_int_t outer_rect, inner_rect; cairo_region_t *outer_region, *inner_region; - GdkRGBA black = {.0, .0, .0, 1.0}; - - gdk_window_set_background_rgba (window, &black); outer_rect.x = outer_rect.y = 0; outer_rect.width = preview->tile_rect.width; -- cgit v1.2.1