[gtk+] x11: Don't set ParentRelative if the parent's visual is different



commit 22d28ef47d0075fc4ef438b956df8df902ebaa55
Author: Benjamin Otte <otte redhat com>
Date:   Fri Oct 15 16:58:29 2010 +0200

    x11: Don't set ParentRelative if the parent's visual is different
    
    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 |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 68c2b2f..9f54ddc 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -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;



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