diff options
| author | Dan Nicolaescu | 2009-01-30 23:45:27 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2009-01-30 23:45:27 +0000 |
| commit | db87892598cf60ddfe183b757e850369fd97ebe2 (patch) | |
| tree | 067a3c35e5f7838b0ca19a08813e8c4b7f6feb37 | |
| parent | 4d18a7a28e249a6335447047f5660282279d4468 (diff) | |
| download | emacs-db87892598cf60ddfe183b757e850369fd97ebe2.tar.gz emacs-db87892598cf60ddfe183b757e850369fd97ebe2.zip | |
* dispnew.c (window_change_signal): Don't try to get the size of a
suspended tty frame.
* term.c (Fresume_tty): Resize if the size has changed while the
tty was suspended.
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/dispnew.c | 5 | ||||
| -rw-r--r-- | src/term.c | 14 |
3 files changed, 23 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 947afe32cd3..0fb12db1707 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2009-01-30 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2009-01-30 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 2 | ||
| 3 | * dispnew.c (window_change_signal): Don't try to get the size of a | ||
| 4 | suspended tty frame. | ||
| 5 | * term.c (Fresume_tty): Resize if the size has changed while the | ||
| 6 | tty was suspended. | ||
| 7 | |||
| 3 | * alloc.c (mark_stack): Properly conditionalize previous change. | 8 | * alloc.c (mark_stack): Properly conditionalize previous change. |
| 4 | 9 | ||
| 5 | 2009-01-30 Juanma Barranquero <lekktu@gmail.com> | 10 | 2009-01-30 Juanma Barranquero <lekktu@gmail.com> |
diff --git a/src/dispnew.c b/src/dispnew.c index c94119fe9c9..bbe0f9fc961 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -6218,6 +6218,11 @@ window_change_signal (signalnum) /* If we don't have an argument, */ | |||
| 6218 | if (! tty->term_initted) | 6218 | if (! tty->term_initted) |
| 6219 | continue; | 6219 | continue; |
| 6220 | 6220 | ||
| 6221 | /* Suspended tty frames have tty->input == NULL avoid trying to | ||
| 6222 | use it. */ | ||
| 6223 | if (!tty->input) | ||
| 6224 | continue; | ||
| 6225 | |||
| 6221 | get_tty_size (fileno (tty->input), &width, &height); | 6226 | get_tty_size (fileno (tty->input), &width, &height); |
| 6222 | 6227 | ||
| 6223 | if (width > 5 && height > 2) { | 6228 | if (width > 5 && height > 2) { |
diff --git a/src/term.c b/src/term.c index c3df9ca4159..0cfc1ff3b95 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -2470,7 +2470,19 @@ the currently selected frame. */) | |||
| 2470 | #endif | 2470 | #endif |
| 2471 | 2471 | ||
| 2472 | if (FRAMEP (t->display_info.tty->top_frame)) | 2472 | if (FRAMEP (t->display_info.tty->top_frame)) |
| 2473 | FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1); | 2473 | { |
| 2474 | struct frame *f = XFRAME (t->display_info.tty->top_frame); | ||
| 2475 | int width, height; | ||
| 2476 | int old_height = FRAME_COLS (f); | ||
| 2477 | int old_width = FRAME_LINES (f); | ||
| 2478 | |||
| 2479 | /* Check if terminal/window size has changed while the frame | ||
| 2480 | was suspended. */ | ||
| 2481 | get_tty_size (fileno (t->display_info.tty->input), &width, &height); | ||
| 2482 | if (width != old_width || height != old_height) | ||
| 2483 | change_frame_size (f, height, width, 0, 0, 0); | ||
| 2484 | FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1); | ||
| 2485 | } | ||
| 2474 | 2486 | ||
| 2475 | init_sys_modes (t->display_info.tty); | 2487 | init_sys_modes (t->display_info.tty); |
| 2476 | 2488 | ||