Tags: patch When Emacs is built with PGTK, frames opened with the emacsclient.desktop entry are opened as X11 windows instead of Wayland. This patch adds a sed command to the Makefile that replaces the environment variable "$DISPLAY" with "$WAYLAND_DISPLAY" when built with PGTK. In GNU Emacs 30.0.50 (build 32, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-08-24 built on T480s Repository revision: 3907c884f03cf5f2a09696bda015b1060c7111ba Repository branch: master System Description: Arch Linux Configured using: 'configure -C --prefix /home/davide/.local --with-pgtk --with-native-compilation --enable-link-time-optimization --enable-locallisppath=/usr/share/emacs/site-lisp/ 'CFLAGS=-march=native -O2''