summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <[email protected]>2017-04-23 09:54:57 +0200
committerraveit65 <[email protected]>2017-04-23 11:25:13 +0200
commite48528e58dbebbe94ea05a78946615b2378e5fd2 (patch)
tree58200f6f4ee3a43401bd6e335c38e881080cb03d
parent0604f8055a242b7d88034686e20669c0eddee49f (diff)
downloadmarco-e48528e58dbebbe94ea05a78946615b2378e5fd2.tar.bz2
marco-e48528e58dbebbe94ea05a78946615b2378e5fd2.tar.xz
tile-preview: avoid a deprecation warning
Taken from: https://git.gnome.org/browse/metacity/commit/?id=3380502
-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;