From: Po Lu Date: Fri, 20 May 2022 01:11:38 +0000 (+0800) Subject: Fix session management detection of the first X display X-Git-Tag: emacs-29.0.90~1910^2~577 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=10411697468ebfcae93ffb48ca773d5321c8a5ec;p=emacs.git Fix session management detection of the first X display * src/xterm.c (x_term_init): Check that there is no other display in the chain instead of testing the terminal ID. --- diff --git a/src/xterm.c b/src/xterm.c index db3f41e688b..a8745894eb2 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -24719,7 +24719,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) /* Only do this for the very first display in the Emacs session. Ignore X session management when Emacs was first started on a tty or started as a daemon. */ - if (terminal->id == 1 && ! IS_DAEMON) + if (!dpyinfo->next && ! IS_DAEMON) x_session_initialize (dpyinfo); #endif