aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv <[email protected]>2008-03-11 07:35:20 +0000
committerJan Djärv <[email protected]>2008-03-11 07:35:20 +0000
commitc523e161a21d8562f41afce933ef15aa1ea139de (patch)
tree066958e55cf58089d09ccfa6d62ec97f00a1ee44
parentcf358568d84eb296a81977eb0d9708389e00fe38 (diff)
(x_connection_closed): For GTK: If this is the last
terminal just exit without closing the display.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xterm.c10
2 files changed, 14 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3f0c3246c3..5a5e9ef48f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-11 Jan Dj$(Q)Z(Brv <[email protected]>
+
+ * xterm.c (x_connection_closed): For GTK: If this is the last
+ terminal just exit without closing the display.
+
2008-03-11 Jason Rumney <[email protected]>
* w32font.c (w32font_full_name): Use floor to round.
diff --git a/src/xterm.c b/src/xterm.c
index 5496dbaca3..c09257c6dd 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8110,7 +8110,7 @@ x_connection_closed (dpy, error_message)
OpenWindows in certain situations. I suspect that is a bug
in OpenWindows. I don't know how to circumvent it here. */
- if (dpyinfo)
+ if (dpyinfo && terminal_list->next_terminal != NULL)
{
#ifdef USE_X_TOOLKIT
/* If DPYINFO is null, this means we didn't open the display
@@ -8124,6 +8124,14 @@ x_connection_closed (dpy, error_message)
#endif
#ifdef USE_GTK
+ /* Due to bugs in some Gtk+ versions, just exit here if this
+ is the last display/terminal. */
+ if (terminal_list->next_terminal == NULL)
+ {
+ fprintf (stderr, "%s\n", error_msg);
+ shut_down_emacs (0, 0, Qnil);
+ exit (70);
+ }
xg_display_close (dpyinfo->display);
#endif