[gtk/gtk-3-24] x11: Always set None pixmap for no background



commit 01d1bc3c75fd0eff5665f5b9c690c5e1e6c65f13
Author: Benjamin Otte <otte redhat com>
Date:   Mon Jun 18 16:17:44 2018 +0200

    x11: Always set None pixmap for no background
    
    None means no background, so it's always the correct thing to use and
    ParentRelative is always wrong.
    
    Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1134

 gdk/x11/gdkwindow-x11.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 00a3a6d268..c6205e42eb 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -2985,17 +2985,8 @@ gdk_window_x11_set_background (GdkWindow      *window,
 
   if (pattern == NULL)
     {
-      GdkWindow *parent;
-
-      /* X throws BadMatch if the parent has a different depth when
-       * using ParentRelative */
-      parent = gdk_window_get_parent (window);
-      if (parent && window->depth != parent->depth)
-        XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
-                                    GDK_WINDOW_XID (window), None);
-      else
-        XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
-                                    GDK_WINDOW_XID (window), ParentRelative);
+      XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
+                                  GDK_WINDOW_XID (window), None);
       return;
     }
 


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