[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f0ff20be51: * src/emacs.c (main): Improve accuracy of daemon warn
From: |
Po Lu |
Subject: |
master f0ff20be51: * src/emacs.c (main): Improve accuracy of daemon warning message on PGTK. |
Date: |
Tue, 5 Apr 2022 22:30:58 -0400 (EDT) |
branch: master
commit f0ff20be51980731364ef5ccf0505c35ea1b4e78
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
* src/emacs.c (main): Improve accuracy of daemon warning message on PGTK.
---
src/emacs.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/emacs.c b/src/emacs.c
index 2a4dcc2c2c..acb409fcb7 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1734,12 +1734,25 @@ main (int argc, char **argv)
sockfd = SD_LISTEN_FDS_START;
#endif /* HAVE_LIBSYSTEMD */
-#ifdef USE_GTK
+ /* On X, the bug happens because we call abort to avoid GLib
+ crashes upon a longjmp in our X error handler.
+
+ On PGTK, GTK calls exit in its own error handlers for either
+ X or Wayland. Display different messages depending on the
+ window system to avoid referring users to the wrong GTK bug
+ report. */
+#ifdef HAVE_PGTK
+ fputs ("Due to a limitation in GTK 3, Emacs built with PGTK will simply
exit when a"
+ "display connection is closed."
+ "\nThere is no way to fix this problem, so if you want to use
Emacs on Wayland"
+ "on multiple displays and have Emacs survive disconnects, you
lose.",
+ stderr);
+#elif defined USE_GTK
fputs ("\nWarning: due to a long standing Gtk+
bug\nhttps://gitlab.gnome.org/GNOME/gtk/issues/221\n\
Emacs might crash when run in daemon mode and the X11 connection is
unexpectedly lost.\n\
Using an Emacs configured with --with-x-toolkit=lucid does not have this
problem.\n",
stderr);
-#endif /* USE_GTK */
+#endif
if (daemon_type == 2)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master f0ff20be51: * src/emacs.c (main): Improve accuracy of daemon warning message on PGTK.,
Po Lu <=