[mutter/wip/cb2eb3: 40/55] frames: Support opacity in frame drawing



commit 0a9bc8995a67e85b6fd5a9bf6a738fd5d4370b98
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu May 3 16:03:45 2012 -0400

    frames: Support opacity in frame drawing
    
    There's still a bug here (frame opacity doesn't "kick in" until we
    change the frame geometry), and the colors aren't correct (we're
    painting on top of a white surface, not a 0-alpha surface), but we
    at least remove some redraw issues that come when you're not always
    obscuring the last paint.

 src/ui/frames.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index ab565bb..7c7690e 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -1584,6 +1584,13 @@ meta_frames_draw (GtkWidget *widget,
 
   gdk_cairo_region (cr, region);
   cairo_clip (cr);
+
+  cairo_save (cr);
+  cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+  cairo_set_source_rgba (cr, 1, 1, 1, 1);
+  cairo_paint (cr);
+  cairo_restore (cr);
+
   meta_frames_paint (frames, frame, cr);
 
  out:


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