frames: Don't bother painting the background

GDK (and also GTK+!) do this for us already.
This commit is contained in:
Jasper St. Pierre 2014-06-21 13:39:36 -04:00
parent b8b0dc5c78
commit 4f9b994e73

View File

@ -1580,28 +1580,6 @@ meta_frames_destroy_event (GtkWidget *widget,
}
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);
}
}
static void
clip_region_to_visible_frame_border (cairo_region_t *region,
MetaUIFrame *frame)
@ -1785,11 +1763,6 @@ meta_frames_draw (GtkWidget *widget,
gdk_cairo_region (cr, region);
cairo_clip (cr);
cairo_save (cr);
setup_bg_cr (cr, frame->window, 0, 0);
cairo_paint (cr);
cairo_restore (cr);
meta_frames_paint (frames, frame, cr);
out: