[metacity] frames: don't bother painting the background



commit 1dcde194923c2f6791de0c6b5d6bd6c3b66b80da
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sat Jun 21 13:39:36 2014 -0400

    frames: don't bother painting the background
    
    GDK (and also GTK+!) do this for us already.

 src/ui/frames.c |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 7872028..d63574a 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2225,28 +2225,6 @@ meta_frames_motion_notify_event     (GtkWidget           *widget,
   return TRUE;
 }
 
-static void
-setup_bg_cr (cairo_t *cr, GdkWindow *window, int x_offset, int y_offset)
-{
-  GdkWindow *parent = gdk_window_get_parent (window);
-  cairo_pattern_t *bg_pattern;
-
-  bg_pattern = gdk_window_get_background_pattern (window);
-  if (bg_pattern == NULL && parent)
-    {
-      gint window_x, window_y;
-
-      gdk_window_get_position (window, &window_x, &window_y);
-      setup_bg_cr (cr, parent, x_offset + window_x, y_offset + window_y);
-    }
-  else if (bg_pattern)
-    {
-      cairo_translate (cr, - x_offset, - y_offset);
-      cairo_set_source (cr, bg_pattern);
-      cairo_translate (cr, x_offset, y_offset);
-    }
-}
-
 /* Returns a pixmap with a piece of the windows frame painted on it.
 */
 
@@ -2269,7 +2247,6 @@ generate_pixmap (MetaFrames            *frames,
   cr = cairo_create (result);
   cairo_translate (cr, -rect->x, -rect->y);
 
-  setup_bg_cr (cr, frame->window, 0, 0);
   cairo_paint (cr);
 
   meta_frames_paint (frames, frame, cr);


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