From 10411697468ebfcae93ffb48ca773d5321c8a5ec Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 20 May 2022 09:11:38 +0800 Subject: [PATCH] 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. --- src/xterm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2