[mutter] frames: "Initialize" frame background



commit a174c18fb5c593e03119961d4b612a0bd0a45fe9
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Jun 23 12:35:44 2016 +0200

    frames: "Initialize" frame background
    
    Frames are painted on the frame window according to the GTK+ theme.
    Depending on the target's visual, this means either drawing over
    a black destination or a fully transparent one. So in cases where
    the theme doesn't paint decorations with full opacity, decorations
    for windows with an rgba visual look different from those with a
    non-rgba visual. Using an rgba visual for all frames independent
    from the client's visual can potentially break clients, so our
    only option for a consistent appearance is to explicitly initialize
    the frame background to black before painting the theme's decoration
    on top.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745060

 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 746fdea..0e90567 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -1403,6 +1403,13 @@ meta_frames_draw (GtkWidget *widget,
   gdk_cairo_region (cr, region);
   cairo_clip (cr);
 
+  /* The target may be cleared to black or transparent, depending
+   * on the frame's visual; we don't want decorations to appear
+   * differently when the theme's decorations aren't fully opaque,
+   * so clear to black first
+   */
+  cairo_paint (cr);
+
   meta_ui_frame_paint (frame, cr);
   cairo_region_destroy (region);
 


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