From 43085522a08b94ef594bd270d61a38d7bb26e036 Mon Sep 17 00:00:00 2001 From: Davide Masserut Date: Thu, 24 Aug 2023 18:33:39 +0200 Subject: [PATCH] Avoid using --display to reuse frames in PGTK Using hard-coded display values can cause PGTK graphical frames to open using the wrong backend or not open at all. * Makefile.in (install-etc): Use --reuse-frame instead of --display=$DISPLAY. --- Makefile.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.in b/Makefile.in index fdd9353e254..c82aad1af60 100644 --- a/Makefile.in +++ b/Makefile.in @@ -843,6 +843,9 @@ EMACS_ICON= ifeq (${USE_STARTUP_NOTIFICATION},no) USE_STARTUP_NOTIFICATION_SED_CMD=-e "/^StartupNotify=true$$/d" endif +ifeq ($(HAVE_PGTK),yes) +USE_WAYLAND_DISPLAY_SED_CMD=-e "s/display=[^ ]*/reuse-frame/" +endif install-etc: umask 022; ${MKDIR_P} "$(DESTDIR)${desktopdir}" tmp=etc/emacs.tmpdesktop; rm -f $${tmp}; \ @@ -857,6 +860,7 @@ install-etc: sed -e "/^Exec=/ s|emacsclient|${bindir}/$${client_name}|" \ -e "/^Icon=emacs/ s/emacs/${EMACS_NAME}/" \ $(USE_STARTUP_NOTIFICATION_SED_CMD) \ + $(USE_WAYLAND_DISPLAY_SED_CMD) \ ${srcdir}/etc/emacsclient.desktop > $${tmp}; \ ${INSTALL_DATA} $${tmp} "$(DESTDIR)${desktopdir}/$${client_name}.desktop"; \ rm -f $${tmp} @@ -870,6 +874,7 @@ install-etc: client_name=`echo emacsclient | sed '$(TRANSFORM)'`${EXEEXT}; \ sed -e "/^Exec=/ s|emacsclient|${bindir}/$${client_name}|" \ -e "/^Icon=emacs/ s/emacs/${EMACS_NAME}/" \ + $(USE_WAYLAND_DISPLAY_SED_CMD) \ ${srcdir}/etc/emacsclient-mail.desktop > $${tmp}; \ ${INSTALL_DATA} $${tmp} "$(DESTDIR)${desktopdir}/$${client_name}-mail.desktop"; \ rm -f $${tmp} -- 2.42.0