diff options
| author | Po Lu | 2022-04-06 10:29:53 +0800 |
|---|---|---|
| committer | Po Lu | 2022-04-06 10:29:53 +0800 |
| commit | f0ff20be51980731364ef5ccf0505c35ea1b4e78 (patch) | |
| tree | 4d1da88c8d7746d0ea85c8f7f911ebeca9e9ca17 /src | |
| parent | e2fb5ecaea67497224455fdbfe4850a5a74c9d00 (diff) | |
| download | emacs-f0ff20be51980731364ef5ccf0505c35ea1b4e78.tar.gz emacs-f0ff20be51980731364ef5ccf0505c35ea1b4e78.zip | |
* src/emacs.c (main): Improve accuracy of daemon warning message on PGTK.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs.c | 17 |
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\ |
| 1739 | Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.\n\ | 1752 | Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.\n\ |
| 1740 | Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.\n", | 1753 | Using 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 | { |