mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
x11: Don't set ParentRealtive if the parent's visual is different
Causes a BadMatch otherwise, see code comments. https://bugzilla.gnome.org/show_bug.cgi?id=630864
This commit is contained in:
parent
72d48cbc61
commit
82e6e32c77
@ -2639,8 +2639,17 @@ gdk_window_x11_set_background (GdkWindow *window,
|
||||
|
||||
if (pattern == NULL)
|
||||
{
|
||||
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
|
||||
GDK_WINDOW_XID (window), ParentRelative);
|
||||
GdkWindow *parent;
|
||||
|
||||
/* X throws BadMatch if the parent has a different visual 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
|
||||
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
|
||||
GDK_WINDOW_XID (window), None);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user