summaryrefslogtreecommitdiff
path: root/src/ui/frames.c
diff options
context:
space:
mode:
authorrcaridade145 <[email protected]>2020-02-06 19:59:51 +0000
committerraveit65 <[email protected]>2020-02-21 16:58:34 +0100
commit7adcd70ebf293c0d40b848afc2fa40e7dc23ac67 (patch)
treef0eae3ff535c9feff30529872b1c6fb7836b6c0e /src/ui/frames.c
parent2acfffca08a81d4cd5c85c17851ae5b347191edd (diff)
downloadmarco-7adcd70ebf293c0d40b848afc2fa40e7dc23ac67.tar.bz2
marco-7adcd70ebf293c0d40b848afc2fa40e7dc23ac67.tar.xz
frames: don't bother painting the background
GDK (and also GTK+!) do this for us already. based on https://gitlab.gnome.org/GNOME/metacity/commit/1dcde194
Diffstat (limited to 'src/ui/frames.c')
-rw-r--r--src/ui/frames.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 82739208..e70480a6 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2261,28 +2261,6 @@ meta_frames_destroy_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.
*/
static cairo_surface_t *
@@ -2304,7 +2282,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_to_drawable (frames, frame, cr);