Subject: bug#63555: closed (Re: bug#63555: emacs 29 complains that it can't connect to the display)

From: Robert Pluim <[email-masked]>
Date: Mon, 22 May 2023 13:28:09 +0200

>>>>> On Mon, 22 May 2023 19:15:40 +0800, Po Lu <[email-masked]> said:

    Po Lu> Robert Pluim <[email-masked]> writes:
    >>>>>>> On Mon, 22 May 2023 17:26:27 +0800, Po Lu <[email-masked]> said:
    >> 
    Po> The problem with this approach is that gtk_init_check initializes the
    Po> window system upon success, so once pgtk_term_init is called in
    Po> pgtkterm.c, the window system is set up a second time, leaving two
    Po> display connections open...
    >> 
    >> Is there anything stopping us from removing that call to gtk_init?

    Po Lu> Yes, since the PGTK build is supposed to support multiple displays.

Ha! And has anyone actually tested that? :-)

    Po Lu> BTW, the other problem with calling `gtk_init_check' is that when it
    Po Lu> returns FALSE, calling any other GTK function results in undefined
    Po Lu> behavior.  Thus, if `gtk_init_check' is used at startup, opening a
    Po Lu> display later becomes unsafe, even if a display connection is then
    Po Lu> available.

Do the gtk folks deliberately set out to make their usersʼ lives
difficult, or is it accidental?

Looks like Eliʼs NEWS entry is it, then.

Robert
--