window: Fail if the parent window and the visual don't match
They must be on the same screen.
This commit is contained in:
parent
fbb4c61665
commit
8f96966178
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user