[gtk+/wip/mir2: 230/232] mir: only paint background if window has one



commit 9f45287b5a50db306789af58c213731f6d193f4f
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Fri Dec 12 03:01:38 2014 +0100

    mir: only paint background if window has one

 gdk/mir/gdkmirwindowimpl.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gdk/mir/gdkmirwindowimpl.c b/gdk/mir/gdkmirwindowimpl.c
index 98ec525..fccba87 100644
--- a/gdk/mir/gdkmirwindowimpl.c
+++ b/gdk/mir/gdkmirwindowimpl.c
@@ -382,13 +382,13 @@ gdk_mir_window_impl_ref_cairo_surface (GdkWindow *window)
   impl->cairo_surface = cairo_surface_reference (cairo_surface);
 
   /* Draw background */
-  c = cairo_create (impl->cairo_surface);
   if (impl->background)
-    cairo_set_source (c, impl->background);
-  else
-    cairo_set_source_rgb (c, 1.0, 0.0, 0.0);
-  cairo_paint (c);
-  cairo_destroy (c);
+    {
+      c = cairo_create (impl->cairo_surface);
+      cairo_set_source (c, impl->background);
+      cairo_paint (c);
+      cairo_destroy (c);
+    }
 
   return cairo_surface;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]