Ensure we have native window before reparenting to toplevel
This commit is contained in:
committed by
Alexander Larsson
parent
2b9dc3338a
commit
aee3c571b0
@ -925,6 +925,11 @@ gdk_window_reparent (GdkWindow *window,
|
|||||||
was_mapped = GDK_WINDOW_IS_MAPPED (window);
|
was_mapped = GDK_WINDOW_IS_MAPPED (window);
|
||||||
show = FALSE;
|
show = FALSE;
|
||||||
|
|
||||||
|
/* Reparenting to toplevel. Ensure we have a native window so this can work */
|
||||||
|
if (new_parent_private->window_type == GDK_WINDOW_ROOT ||
|
||||||
|
new_parent_private->window_type == GDK_WINDOW_FOREIGN)
|
||||||
|
gdk_window_set_has_native (window, TRUE);
|
||||||
|
|
||||||
if (gdk_window_has_impl (private))
|
if (gdk_window_has_impl (private))
|
||||||
{
|
{
|
||||||
/* Native window */
|
/* Native window */
|
||||||
@ -932,12 +937,9 @@ gdk_window_reparent (GdkWindow *window,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (new_parent_private->window_type == GDK_WINDOW_ROOT)
|
/* This shouldn't happen, as we created a native in this case, check anyway to see if that ever fails */
|
||||||
{
|
g_assert (new_parent_private->window_type != GDK_WINDOW_ROOT &&
|
||||||
/* TODO: We need to convert to a native window here */
|
new_parent_private->window_type != GDK_WINDOW_FOREIGN);
|
||||||
g_warning ("Reparenting client side windows to the root window not yet supported");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
show = was_mapped;
|
show = was_mapped;
|
||||||
gdk_window_hide (window);
|
gdk_window_hide (window);
|
||||||
|
|||||||
Reference in New Issue
Block a user