summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-09-27 13:42:10 +0200
committerBenjamin Otte <otte@redhat.com>2012-09-28 18:27:49 +0200
commit8f96966178dd14d1d625df991d2bdf85e431dfa3 (patch)
tree9a2060b650513b9f3e0258d4a7f440fb96602f42
parentfbb4c616659a5472f89d170977e181fe6884d97a (diff)
downloadgtk+-8f96966178dd14d1d625df991d2bdf85e431dfa3.tar.gz
window: Fail if the parent window and the visual don't match
They must be on the same screen.
-rw-r--r--gdk/gdkwindow.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index ae77620888..206edc3b69 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -1363,6 +1363,11 @@ gdk_window_new (GdkWindow *parent,
return NULL;
}
+ if (attributes_mask & GDK_WA_VISUAL)
+ {
+ g_return_val_if_fail (gdk_visual_get_screen (attributes->visual) == screen, NULL);
+ }
+
display = gdk_screen_get_display (screen);
window = _gdk_display_create_window (display);