diff options
| author | Glenn Morris | 2014-08-03 16:34:33 -0400 |
|---|---|---|
| committer | Glenn Morris | 2014-08-03 16:34:33 -0400 |
| commit | 3cc0c06094c8731c9e15536fefd3382d8ca1eba0 (patch) | |
| tree | 3e6011e46b620c73efdccacf932bdc3565488655 /src/xterm.c | |
| parent | 308cc448e5d6ffd44c7ff366a99d34bbfb0e8c4d (diff) | |
| parent | a270fa7cf82cb23c6dcd84aab7f2c178ac0cca55 (diff) | |
| download | emacs-3cc0c06094c8731c9e15536fefd3382d8ca1eba0.tar.gz emacs-3cc0c06094c8731c9e15536fefd3382d8ca1eba0.zip | |
Merge from emacs-24; up to 2014-06-27T16:27:08Z!rgm@gnu.org
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/xterm.c b/src/xterm.c index e35d63c785f..4fa4b7ab02b 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -10815,6 +10815,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 10815 | 10815 | ||
| 10816 | dpyinfo->name_list_element = Fcons (display_name, Qnil); | 10816 | dpyinfo->name_list_element = Fcons (display_name, Qnil); |
| 10817 | dpyinfo->display = dpy; | 10817 | dpyinfo->display = dpy; |
| 10818 | dpyinfo->connection = ConnectionNumber (dpyinfo->display); | ||
| 10818 | 10819 | ||
| 10819 | /* Set the name of the terminal. */ | 10820 | /* Set the name of the terminal. */ |
| 10820 | terminal->name = xlispstrdup (display_name); | 10821 | terminal->name = xlispstrdup (display_name); |
| @@ -11267,7 +11268,6 @@ void | |||
| 11267 | x_delete_terminal (struct terminal *terminal) | 11268 | x_delete_terminal (struct terminal *terminal) |
| 11268 | { | 11269 | { |
| 11269 | struct x_display_info *dpyinfo = terminal->display_info.x; | 11270 | struct x_display_info *dpyinfo = terminal->display_info.x; |
| 11270 | int connection = -1; | ||
| 11271 | 11271 | ||
| 11272 | /* Protect against recursive calls. delete_frame in | 11272 | /* Protect against recursive calls. delete_frame in |
| 11273 | delete_terminal calls us back when it deletes our last frame. */ | 11273 | delete_terminal calls us back when it deletes our last frame. */ |
| @@ -11286,8 +11286,6 @@ x_delete_terminal (struct terminal *terminal) | |||
| 11286 | and dpyinfo->display was set to 0 to indicate that. */ | 11286 | and dpyinfo->display was set to 0 to indicate that. */ |
| 11287 | if (dpyinfo->display) | 11287 | if (dpyinfo->display) |
| 11288 | { | 11288 | { |
| 11289 | connection = ConnectionNumber (dpyinfo->display); | ||
| 11290 | |||
| 11291 | x_destroy_all_bitmaps (dpyinfo); | 11289 | x_destroy_all_bitmaps (dpyinfo); |
| 11292 | XSetCloseDownMode (dpyinfo->display, DestroyAll); | 11290 | XSetCloseDownMode (dpyinfo->display, DestroyAll); |
| 11293 | 11291 | ||
| @@ -11329,11 +11327,12 @@ x_delete_terminal (struct terminal *terminal) | |||
| 11329 | } | 11327 | } |
| 11330 | 11328 | ||
| 11331 | /* No more input on this descriptor. */ | 11329 | /* No more input on this descriptor. */ |
| 11332 | if (connection != -1) | 11330 | if (0 <= dpyinfo->connection) |
| 11333 | delete_keyboard_wait_descriptor (connection); | 11331 | delete_keyboard_wait_descriptor (dpyinfo->connection); |
| 11334 | 11332 | ||
| 11335 | /* Mark as dead. */ | 11333 | /* Mark as dead. */ |
| 11336 | dpyinfo->display = NULL; | 11334 | dpyinfo->display = NULL; |
| 11335 | dpyinfo->connection = -1; | ||
| 11337 | x_delete_display (dpyinfo); | 11336 | x_delete_display (dpyinfo); |
| 11338 | unblock_input (); | 11337 | unblock_input (); |
| 11339 | } | 11338 | } |