summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin@sipsolutions.net>2013-08-02 11:17:17 +0200
committerArx Cruz <arxcruz@gnome.org>2013-08-05 10:42:11 -0300
commit58245d4d4acd00e256e29159e645fa0c5f117d34 (patch)
treeedfb3963619e758dd9bbac2ef64e5ed9a1c34e89
parentUpdated Chinese simplified translation for help (diff)
downloadzenity-58245d4d4acd00e256e29159e645fa0c5f117d34.tar.gz
zenity-58245d4d4acd00e256e29159e645fa0c5f117d34.tar.bz2
zenity-58245d4d4acd00e256e29159e645fa0c5f117d34.zip
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.
-rw-r--r--src/util.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index df7317a9..a6f2896f 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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);
}
bgstack15