Add a runtime check for X11 (bug #705335)

If GTK+ is compiled with multiple backends, then it is necessary
to do a runtime check for the used backend.
This commit is contained in:
Benjamin Berg 2013-08-02 11:17:17 +02:00 committed by Arx Cruz
parent f7d071883a
commit 58245d4d4a

View File

@ -417,8 +417,11 @@ zenity_util_show_dialog (GtkWidget *dialog)
{
gtk_widget_realize (dialog);
#ifdef GDK_WINDOWING_X11
g_assert (gtk_widget_get_window(dialog));
zenity_util_make_transient (gtk_widget_get_window(dialog));
if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
{
g_assert (gtk_widget_get_window(dialog));
zenity_util_make_transient (gtk_widget_get_window(dialog));
}
#endif
gtk_widget_show (dialog);
}