forked from AuroraMiddleware/gtk
x11: Don't crash if a window is on an unmanaged screen
_gdk_x11_display_screen_for_xrootwin() can return NULL. If so, return NULL from gdk_x11_window_foreign_new_for_display(). https://bugzilla.gnome.org/show_bug.cgi?id=709716
This commit is contained in:
parent
d1414211bf
commit
1d2a070254
@ -1229,6 +1229,8 @@ gdk_x11_window_foreign_new_for_display (GdkDisplay *display,
|
||||
XFree (children);
|
||||
|
||||
screen = _gdk_x11_display_screen_for_xrootwin (display, root);
|
||||
if (screen == NULL)
|
||||
return NULL;
|
||||
|
||||
win = _gdk_display_create_window (display);
|
||||
win->impl = g_object_new (GDK_TYPE_WINDOW_IMPL_X11, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user