[gtk+/gtk-3-16] x11: Relax requirements for setting ParentRelative
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-16] x11: Relax requirements for setting ParentRelative
- Date: Mon, 13 Apr 2015 13:09:54 +0000 (UTC)
commit ee679931abaaf0929911ad4edefbbfa248a0170f
Author: Evangelos Foutras <evangelos foutrelis com>
Date: Sat Apr 11 11:20:56 2015 +0300
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
gdk/x11/gdkwindow-x11.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 25b5e2b..1ace677 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -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))
+ if (parent && window->depth != parent->depth)
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XID (window), ParentRelative);
+ GDK_WINDOW_XID (window), None);
else
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
- GDK_WINDOW_XID (window), None);
+ GDK_WINDOW_XID (window), ParentRelative);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]