]> Pileus Git - ~andy/gtk/commitdiff
x11: Don't set ParentRelative if the parent's visual is different
authorBenjamin Otte <otte@redhat.com>
Fri, 15 Oct 2010 14:58:29 +0000 (16:58 +0200)
committerVincent Untz <vuntz@gnome.org>
Fri, 15 Oct 2010 15:10:05 +0000 (17:10 +0200)
It's like 82e6e32c, but when a pattern is given as argument.

https://bugzilla.gnome.org/show_bug.cgi?id=632218

gdk/x11/gdkwindow-x11.c

index 68c2b2fbb5c7298797668262b8d71629627feae0..9f54ddc3c564760a868aa147ee799482506edd82 100644 (file)
@@ -2674,6 +2674,7 @@ gdk_window_x11_set_background (GdkWindow      *window,
       if (cairo_pattern_get_surface (pattern, &surface) == CAIRO_STATUS_SUCCESS &&
           matrix_is_identity (&matrix) &&
           cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_XLIB &&
+          cairo_xlib_surface_get_visual (surface) == GDK_VISUAL_XVISUAL (gdk_window_get_visual ((window))) &&
           cairo_xlib_surface_get_display (surface) == GDK_WINDOW_XDISPLAY (window))
         {
           double x, y;