aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/haikufns.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/haikufns.c b/src/haikufns.c
index ea42dd0daa6..69f502fb016 100644
--- a/src/haikufns.c
+++ b/src/haikufns.c
@@ -1844,16 +1844,29 @@ DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection,
1844 doc: /* SKIP: real doc in xfns.c. */) 1844 doc: /* SKIP: real doc in xfns.c. */)
1845 (Lisp_Object display, Lisp_Object resource_string, Lisp_Object must_succeed) 1845 (Lisp_Object display, Lisp_Object resource_string, Lisp_Object must_succeed)
1846{ 1846{
1847 struct haiku_display_info *dpy_info; 1847 struct haiku_display_info *dpyinfo;
1848 CHECK_STRING (display); 1848 CHECK_STRING (display);
1849 1849
1850 if (NILP (Fstring_equal (display, build_string ("be")))) 1850 if (NILP (Fstring_equal (display, build_string ("be"))))
1851 !NILP (must_succeed) ? fatal ("Bad display") : error ("Bad display"); 1851 {
1852 dpy_info = haiku_term_init (); 1852 if (!NILP (must_succeed))
1853 fatal ("Bad display");
1854 else
1855 error ("Bad display");
1856 }
1857
1858 if (x_display_list)
1859 return Qnil;
1860
1861 dpyinfo = haiku_term_init ();
1853 1862
1854 if (!dpy_info) 1863 if (!dpyinfo)
1855 !NILP (must_succeed) ? fatal ("Display not responding") : 1864 {
1856 error ("Display not responding"); 1865 if (!NILP (must_succeed))
1866 fatal ("Display not responding");
1867 else
1868 error ("Display not responding");
1869 }
1857 1870
1858 return Qnil; 1871 return Qnil;
1859} 1872}