mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-27 07:41:28 -08:00
Prevent Haiku display from being opened multiple times
* src/haikufns.c (Fx_open_connection): Return if display connection already exists.
This commit is contained in:
parent
e087c89b1e
commit
fc281e0df3
1 changed files with 19 additions and 6 deletions
|
|
@ -1844,16 +1844,29 @@ DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection,
|
|||
doc: /* SKIP: real doc in xfns.c. */)
|
||||
(Lisp_Object display, Lisp_Object resource_string, Lisp_Object must_succeed)
|
||||
{
|
||||
struct haiku_display_info *dpy_info;
|
||||
struct haiku_display_info *dpyinfo;
|
||||
CHECK_STRING (display);
|
||||
|
||||
if (NILP (Fstring_equal (display, build_string ("be"))))
|
||||
!NILP (must_succeed) ? fatal ("Bad display") : error ("Bad display");
|
||||
dpy_info = haiku_term_init ();
|
||||
{
|
||||
if (!NILP (must_succeed))
|
||||
fatal ("Bad display");
|
||||
else
|
||||
error ("Bad display");
|
||||
}
|
||||
|
||||
if (!dpy_info)
|
||||
!NILP (must_succeed) ? fatal ("Display not responding") :
|
||||
error ("Display not responding");
|
||||
if (x_display_list)
|
||||
return Qnil;
|
||||
|
||||
dpyinfo = haiku_term_init ();
|
||||
|
||||
if (!dpyinfo)
|
||||
{
|
||||
if (!NILP (must_succeed))
|
||||
fatal ("Display not responding");
|
||||
else
|
||||
error ("Display not responding");
|
||||
}
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue