summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlberts Muktupāvels <[email protected]>2017-04-23 09:54:57 +0200
committerraveit65 <[email protected]>2017-05-10 17:03:41 +0200
commit105abf2b5f34489bb3a5d62753c32178471379a9 (patch)
tree93174fd443affd38c64e4e8fb131b9f965643401 /src
parent18e28b046a736a7046df158a745da73cf518140c (diff)
downloadmarco-105abf2b5f34489bb3a5d62753c32178471379a9.tar.bz2
marco-105abf2b5f34489bb3a5d62753c32178471379a9.tar.xz
tile-preview: avoid a deprecation warning
Taken from: https://git.gnome.org/browse/metacity/commit/?id=3380502
Diffstat (limited to 'src')
-rw-r--r--src/ui/tile-preview.c7
1 files changed, 4 insertions, 3 deletions
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;