changeset 69549:8214188f641e

(main): If user asks for a display that is unavailable, simulate -nw.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 18 Mar 2006 13:48:33 +0000
parents 83eb46979fc7
children cd511b21f729
files src/emacs.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/emacs.c	Sat Mar 18 13:30:13 2006 +0000
+++ b/src/emacs.c	Sat Mar 18 13:48:33 2006 +0000
@@ -53,6 +53,10 @@
 #include "buffer.h"
 #include "window.h"
 
+#ifdef HAVE_X_WINDOWS
+#include "xterm.h"
+#endif
+
 #include "systty.h"
 #include "blockinput.h"
 #include "syssignal.h"
@@ -1482,6 +1486,14 @@
 
     /* Don't actually discard this arg.  */
     skip_args = count_before;
+
+    /* Do not be lenient if the user explicitly asked for a named display.  */
+    if (display_arg != 1 && !x_display_ok (displayname))
+      {
+	fprintf (stderr, "Display %s unavailable, simulating -nw\n",
+		 displayname);
+	inhibit_window_system = 1;
+      }
   }
 #endif