window: Fail if the parent window and the visual don't match

They must be on the same screen.
This commit is contained in:
Benjamin Otte 2012-09-27 13:42:10 +02:00
parent fbb4c61665
commit 8f96966178

View File

@ -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);