forked from AuroraMiddleware/gtk
x11: Relax requirements for setting ParentRelative
XSetWindowBackgroundPixmap() will throw BadMatch only in the case of a different parent window depth. Different visuals are fine and actually expected in Gtk+ 3.16 (since we don't stick to the system default visual but try to pick a better one). https://bugzilla.gnome.org/show_bug.cgi?id=747524
This commit is contained in:
parent
fe7bc84c89
commit
374bedc0e2
@ -2963,15 +2963,15 @@ gdk_window_x11_set_background (GdkWindow *window,
|
||||
{
|
||||
GdkWindow *parent;
|
||||
|
||||
/* X throws BadMatch if the parent has a different visual when
|
||||
/* X throws BadMatch if the parent has a different depth when
|
||||
* using ParentRelative */
|
||||
parent = gdk_window_get_parent (window);
|
||||
if (parent && gdk_window_get_visual (parent) == gdk_window_get_visual (window))
|
||||
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
|
||||
GDK_WINDOW_XID (window), ParentRelative);
|
||||
else
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user