Commit 3671b2bb authored by Loïc Minier's avatar Loïc Minier Committed by Loic Minier

Fix "cannot open display" error message when display is set by the DISPLAY

2007-10-15  Loïc Minier  <lool@dooz.org>

        * gtk/gtkmain.c: (gtk_init): Fix "cannot open display" error message
        when display is set by the DISPLAY env var. (#486636, Mike Hommey)

svn path=/trunk/; revision=18909
parent 0b007d52
2007-10-15 Loïc Minier <lool@dooz.org>
* gtk/gtkmain.c: (gtk_init): Fix "cannot open display" error message
when display is set by the DISPLAY env var. (#486636, Mike Hommey)
2007-10-13 Johan Dahlin <jdahlin@async.com.br>
* gtk/gtk-builder-convert
......
......@@ -933,7 +933,9 @@ gtk_init (int *argc, char ***argv)
if (!gtk_init_check (argc, argv))
{
const char *display_name_arg = gdk_get_display_arg_name ();
g_warning ("cannot open display: %s", display_name_arg ? display_name_arg : " ");
if (display_name_arg == NULL)
display_name_arg = getenv("DISPLAY");
g_warning ("cannot open display: %s", display_name_arg ? display_name_arg : "");
exit (1);
}
}
......
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