forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
0b007d52e2
commit
3671b2bbe9
@ -1,3 +1,8 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user