]> git.eshelyaron.com Git - emacs.git/commitdiff
* dispnew.c (window_change_signal): Don't try to get the size of a
authorDan Nicolaescu <dann@ics.uci.edu>
Fri, 30 Jan 2009 23:45:27 +0000 (23:45 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Fri, 30 Jan 2009 23:45:27 +0000 (23:45 +0000)
suspended tty frame.
* term.c (Fresume_tty): Resize if the size has changed while the
tty was suspended.

src/ChangeLog
src/dispnew.c
src/term.c

index 947afe32cd305dbe869be9bb295ac551b0c61ba2..0fb12db17071678aeec15e2b8932d490f1f48853 100644 (file)
@@ -1,5 +1,10 @@
 2009-01-30  Dan Nicolaescu  <dann@ics.uci.edu>
 
+       * 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.
+
        * alloc.c (mark_stack): Properly conditionalize previous change.
 
 2009-01-30  Juanma Barranquero  <lekktu@gmail.com>
index c94119fe9c929736760bf4e3d8d3bb9ece008b93..bbe0f9fc96137b6a81c4d80d145cafce2f70c573 100644 (file)
@@ -6218,6 +6218,11 @@ window_change_signal (signalnum) /* If we don't have an argument, */
     if (! tty->term_initted)
       continue;
 
+    /* Suspended tty frames have tty->input == NULL avoid trying to
+       use it.  */
+    if (!tty->input)
+      continue;
+
     get_tty_size (fileno (tty->input), &width, &height);
 
     if (width > 5 && height > 2) {
index c3df9ca4159a7b3e043c8239dd4009358516e660..0cfc1ff3b95a5894598bf2dff155365dc947173f 100644 (file)
@@ -2470,7 +2470,19 @@ the currently selected frame. */)
 #endif
 
       if (FRAMEP (t->display_info.tty->top_frame))
-        FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1);
+       {
+         struct frame *f = XFRAME (t->display_info.tty->top_frame);
+         int width, height;
+         int old_height = FRAME_COLS (f);
+         int old_width = FRAME_LINES (f);
+
+         /* Check if terminal/window size has changed while the frame
+            was suspended.  */
+         get_tty_size (fileno (t->display_info.tty->input), &width, &height);
+         if (width != old_width || height != old_height)
+           change_frame_size (f, height, width, 0, 0, 0);
+         FRAME_SET_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1);
+       }
 
       init_sys_modes (t->display_info.tty);