Commit 9dcdca25 authored by Kristian Rietveld's avatar Kristian Rietveld
Browse files

Don't use GTK_IS_PLUG for non-X11 backends

parent 73afbc95
......@@ -9249,6 +9249,8 @@ gtk_widget_set_parent_window (GtkWidget *widget,
if (parent_window != old_parent_window)
{
gboolean is_plug;
g_object_set_qdata (G_OBJECT (widget), quark_parent_window,
parent_window);
if (old_parent_window)
......@@ -9260,7 +9262,12 @@ gtk_widget_set_parent_window (GtkWidget *widget,
* this is the primary entry point to allow toplevels to be
* embeddable.
*/
if (GTK_IS_WINDOW (widget) && !GTK_IS_PLUG (widget))
#ifdef GDK_WINDOWING_X11
is_plug = GTK_IS_PLUG (widget);
#else
is_plug = FALSE;
#endif
if (GTK_IS_WINDOW (widget) && !is_plug)
_gtk_window_set_is_toplevel (GTK_WINDOW (widget), parent_window == NULL);
}
}
......
......@@ -4587,6 +4587,7 @@ gtk_window_show (GtkWidget *widget)
GtkWindowPrivate *priv = window->priv;
GtkContainer *container = GTK_CONTAINER (window);
gboolean need_resize;
gboolean is_plug;
if (!gtk_widget_is_toplevel (GTK_WIDGET (widget)))
{
......@@ -4658,7 +4659,12 @@ gtk_window_show (GtkWidget *widget)
/* Try to make sure that we have some focused widget
*/
if (!priv->focus_widget && !GTK_IS_PLUG (window))
#ifdef GDK_WINDOWING_X11
is_plug = GTK_IS_PLUG (window);
#else
is_plug = FALSE;
#endif
if (!priv->focus_widget && !is_plug)
gtk_window_move_focus (widget, GTK_DIR_TAB_FORWARD);
if (priv->modal)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment