window: Fail if the parent window and the visual don't match
They must be on the same screen.
This commit is contained in:
@ -1363,6 +1363,11 @@ gdk_window_new (GdkWindow *parent,
|
|||||||
return NULL;
|
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);
|
display = gdk_screen_get_display (screen);
|
||||||
|
|
||||||
window = _gdk_display_create_window (display);
|
window = _gdk_display_create_window (display);
|
||||||
|
|||||||
Reference in New Issue
Block a user