From a2bf7b8533909a9057ce694dfd01e31083a8fa77 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Sun, 14 Jul 2024 21:50:33 +0100 Subject: [PATCH] Apply --display kluge for PGTK too * src/emacs.c (main): The --display option needs the same handling with the PGTK backend as it does with the X11 backends. (Bug#72118) (cherry picked from commit 8a072d1f05befb302a2107c44b935af7a69ad0d3) --- src/emacs.c | 4 ++-- src/lisp.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index 37c8b28fc2c..b0d1f2f53e8 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -191,7 +191,7 @@ bool inhibit_window_system; data on the first attempt to change it inside asynchronous code. */ bool running_asynch_code; -#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) +#if defined (HAVE_X_WINDOWS) || defined (HAVE_PGTK) || defined (HAVE_NS) /* If true, -d was specified, meaning we're using some window system. */ bool display_arg; #endif @@ -2074,7 +2074,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem { int count_before = skip_args; -#ifdef HAVE_X_WINDOWS +#if defined (HAVE_X_WINDOWS) || defined (HAVE_PGTK) char *displayname = 0; /* Skip any number of -d options, but only use the last one. */ diff --git a/src/lisp.h b/src/lisp.h index 8ac65ca429c..c8c6854f5f5 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -5199,7 +5199,7 @@ extern void syms_of_frame (void); extern char **initial_argv; extern int initial_argc; extern char const *emacs_wd; -#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) +#if defined (HAVE_X_WINDOWS) || defined (HAVE_PGTK) || defined (HAVE_NS) extern bool display_arg; #endif extern Lisp_Object decode_env_path (const char *, const char *, bool); -- 2.39.2