aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2022-04-06 10:29:53 +0800
committerPo Lu2022-04-06 10:29:53 +0800
commitf0ff20be51980731364ef5ccf0505c35ea1b4e78 (patch)
tree4d1da88c8d7746d0ea85c8f7f911ebeca9e9ca17
parente2fb5ecaea67497224455fdbfe4850a5a74c9d00 (diff)
downloademacs-f0ff20be51980731364ef5ccf0505c35ea1b4e78.tar.gz
emacs-f0ff20be51980731364ef5ccf0505c35ea1b4e78.zip
* src/emacs.c (main): Improve accuracy of daemon warning message on PGTK.
-rw-r--r--src/emacs.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 2a4dcc2c2c3..acb409fcb73 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1734,12 +1734,25 @@ main (int argc, char **argv)
1734 sockfd = SD_LISTEN_FDS_START; 1734 sockfd = SD_LISTEN_FDS_START;
1735#endif /* HAVE_LIBSYSTEMD */ 1735#endif /* HAVE_LIBSYSTEMD */
1736 1736
1737#ifdef USE_GTK 1737 /* On X, the bug happens because we call abort to avoid GLib
1738 crashes upon a longjmp in our X error handler.
1739
1740 On PGTK, GTK calls exit in its own error handlers for either
1741 X or Wayland. Display different messages depending on the
1742 window system to avoid referring users to the wrong GTK bug
1743 report. */
1744#ifdef HAVE_PGTK
1745 fputs ("Due to a limitation in GTK 3, Emacs built with PGTK will simply exit when a"
1746 "display connection is closed."
1747 "\nThere is no way to fix this problem, so if you want to use Emacs on Wayland"
1748 "on multiple displays and have Emacs survive disconnects, you lose.",
1749 stderr);
1750#elif defined USE_GTK
1738 fputs ("\nWarning: due to a long standing Gtk+ bug\nhttps://gitlab.gnome.org/GNOME/gtk/issues/221\n\ 1751 fputs ("\nWarning: due to a long standing Gtk+ bug\nhttps://gitlab.gnome.org/GNOME/gtk/issues/221\n\
1739Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.\n\ 1752Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.\n\
1740Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.\n", 1753Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.\n",
1741 stderr); 1754 stderr);
1742#endif /* USE_GTK */ 1755#endif
1743 1756
1744 if (daemon_type == 2) 1757 if (daemon_type == 2)
1745 { 1758 {