From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63555: closed (Re: bug#63555: emacs 29 complains that it can't connect to the display) Date: Mon, 22 May 2023 17:26:27 +0800 Message-ID: <877ct0zph8.fsf@yahoo.com> References: <83ednbrwfp.fsf@gnu.org> <87ttwbawse.fsf@vps.thesusis.net> <87a5xyrjce.fsf@vps.thesusis.net> <875y8klt89.fsf@gmail.com> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12341"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Phillip Susi , 63555@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 22 11:27:23 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q11p5-000331-Gz for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 May 2023 11:27:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q11on-0006Ip-2X; Mon, 22 May 2023 05:27:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q11ol-0006IW-8r for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 05:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q11ol-0008OC-10 for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 05:27:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q11ok-0007eZ-Ed for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 05:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 May 2023 09:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63555 X-GNU-PR-Package: emacs Original-Received: via spool by 63555-submit@debbugs.gnu.org id=B63555.168474760429392 (code B ref 63555); Mon, 22 May 2023 09:27:02 +0000 Original-Received: (at 63555) by debbugs.gnu.org; 22 May 2023 09:26:44 +0000 Original-Received: from localhost ([127.0.0.1]:33568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q11oS-0007e0-7S for submit@debbugs.gnu.org; Mon, 22 May 2023 05:26:44 -0400 Original-Received: from sonic301-31.consmr.mail.ne1.yahoo.com ([66.163.184.200]:40481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q11oQ-0007dn-DP for 63555@debbugs.gnu.org; Mon, 22 May 2023 05:26:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1684747597; bh=iA41MBk63mR13q7hKAs6uVHpS4+VbcPmyxm/RSTffoM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=pBboVb/aw02JIhntQTuUBKZC4b8tuRrvSvZ9ac3Ug/Op60XQ5Y+93VWeGQPngvFl/8FjMOCgATKg9OeQTmEzt8+DYBVbxS42x9oJ4fND9x8XpUoFnEDLMj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cWoGmDuF0Vi5.0lzhHet2qDD duxtVXfD3qUwihgww9mKeBsEOLDmvEVoGxh850Mx8bqyfX2_35W4Kmm6oGI.id4JlFKYesBQIJBv z1dNcatlS4aGx9o3lDUn8B.NwX4m6NGvPt6lQv5tJISzkDFBoOmR.mMzaIkLW.XC5NsVF3K9y.WE fzhV9NmoWa2VSoZNqZmNngSmXzXkOUQkQULhwDXa53UQweMWICEgt4eRzoch5Aovv_iTrCRyeJ8W dtiyTBrTqs_6NaOsdC5QcmOCAB8_5UiC2TJvuWKoyqN5A2n0qMLcrNqMbhNP5C0jl4Zh3nPIxY2e AYo8TIZ93vsrHHv4Mpo_5tEkm4jZ_bBe2ygcseO50RAtyABSqsOJrbuhygs714N9cgCaK1_QZ4cv QxaOvDaBEzh5HNynLrMxCZWUegTTDi.LPmAVnxYriid1sHvJfBdu_1XXcqI4lbqwJ2uJT.6JNMOQ 6nM.xMHTczzOjF1.4f0COiAWL4yg.cv.8dw7vMXr0U X-Sonic-MF: X-Sonic-ID: e163ee4f-8eaf-4e49-aaf7-4acd952e0ae2 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Mon, 22 May 2023 09:26:37 +0000 Original-Received: by hermes--production-sg3-748897c457-vf9wl (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID efadfdec7cc4f19ae30dc2f8d10db514; Mon, 22 May 2023 09:26:32 +0000 (UTC) In-Reply-To: <875y8klt89.fsf@gmail.com> (Robert Pluim's message of "Mon, 22 May 2023 09:29:10 +0200") X-Mailer: WebService/1.1.21495 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262137 Archived-At: Robert Pluim writes: > Not too hard. Very much for master, though (and I=CA=BCd need to check if > gtk_init_check has any GTK version dependencies). > > diff --git a/src/dispnew.c b/src/dispnew.c > index a928a5d1b14..9a23fb5a182 100644 > --- a/src/dispnew.c > +++ b/src/dispnew.c > @@ -6518,7 +6518,28 @@ init_display_interactive (void) > try to use X, and if that fails output a line to stderr > reporting that -nw will be simulated. */ >=20=20 > -#ifdef HAVE_X_WINDOWS > +#ifdef HAVE_PGTK > + if (! inhibit_window_system) > + { > + if (! gtk_init_check (0, 0)) > + { > + fprintf (stderr, "PGTK display unavailable, simulating -nw\nCheck you= r $DISPLAY, $WAYLAND_DISPLAY, or $BROADWAY_DISPLAY\n"); > + inhibit_window_system =3D 1; > + } > + } The problem with this approach is that gtk_init_check initializes the window system upon success, so once pgtk_term_init is called in pgtkterm.c, the window system is set up a second time, leaving two display connections open...