diff options
| author | Jan Djärv | 2008-03-11 07:35:20 +0000 |
|---|---|---|
| committer | Jan Djärv | 2008-03-11 07:35:20 +0000 |
| commit | c523e161a21d8562f41afce933ef15aa1ea139de (patch) | |
| tree | 066958e55cf58089d09ccfa6d62ec97f00a1ee44 /src | |
| parent | cf358568d84eb296a81977eb0d9708389e00fe38 (diff) | |
| download | emacs-c523e161a21d8562f41afce933ef15aa1ea139de.tar.gz emacs-c523e161a21d8562f41afce933ef15aa1ea139de.zip | |
(x_connection_closed): For GTK: If this is the last
terminal just exit without closing the display.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xterm.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3f0c3246c33..5a5e9ef48fd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-03-11 Jan Dj$(Q)Z(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xterm.c (x_connection_closed): For GTK: If this is the last | ||
| 4 | terminal just exit without closing the display. | ||
| 5 | |||
| 1 | 2008-03-11 Jason Rumney <jasonr@gnu.org> | 6 | 2008-03-11 Jason Rumney <jasonr@gnu.org> |
| 2 | 7 | ||
| 3 | * w32font.c (w32font_full_name): Use floor to round. | 8 | * w32font.c (w32font_full_name): Use floor to round. |
diff --git a/src/xterm.c b/src/xterm.c index 5496dbaca32..c09257c6dda 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -8110,7 +8110,7 @@ x_connection_closed (dpy, error_message) | |||
| 8110 | OpenWindows in certain situations. I suspect that is a bug | 8110 | OpenWindows in certain situations. I suspect that is a bug |
| 8111 | in OpenWindows. I don't know how to circumvent it here. */ | 8111 | in OpenWindows. I don't know how to circumvent it here. */ |
| 8112 | 8112 | ||
| 8113 | if (dpyinfo) | 8113 | if (dpyinfo && terminal_list->next_terminal != NULL) |
| 8114 | { | 8114 | { |
| 8115 | #ifdef USE_X_TOOLKIT | 8115 | #ifdef USE_X_TOOLKIT |
| 8116 | /* If DPYINFO is null, this means we didn't open the display | 8116 | /* If DPYINFO is null, this means we didn't open the display |
| @@ -8124,6 +8124,14 @@ x_connection_closed (dpy, error_message) | |||
| 8124 | #endif | 8124 | #endif |
| 8125 | 8125 | ||
| 8126 | #ifdef USE_GTK | 8126 | #ifdef USE_GTK |
| 8127 | /* Due to bugs in some Gtk+ versions, just exit here if this | ||
| 8128 | is the last display/terminal. */ | ||
| 8129 | if (terminal_list->next_terminal == NULL) | ||
| 8130 | { | ||
| 8131 | fprintf (stderr, "%s\n", error_msg); | ||
| 8132 | shut_down_emacs (0, 0, Qnil); | ||
| 8133 | exit (70); | ||
| 8134 | } | ||
| 8127 | xg_display_close (dpyinfo->display); | 8135 | xg_display_close (dpyinfo->display); |
| 8128 | #endif | 8136 | #endif |
| 8129 | 8137 | ||