Make sure the SIGWINCH handler is always set (rep. by Yoshiaki Kasahara).
authorKaroly Lorentey <lorentey@elte.hu>
Sat, 5 Jun 2004 22:34:24 +0000 (22:34 +0000)
committerKaroly Lorentey <lorentey@elte.hu>
Sat, 5 Jun 2004 22:34:24 +0000 (22:34 +0000)
* src/dispnew.c (init_display): Always install handler for SIGWINCH.
(Reported by Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp>.)

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-186

src/dispnew.c

index fb78aa9..8d64a95 100644 (file)
@@ -6616,6 +6616,16 @@ init_display ()
      during startup.  */
   Vinitial_window_system = Qnil;
 
+  /* SIGWINCH needs to be handled no matter what display we start
+     with.  Otherwise newly opened tty frames will not resize
+     automatically. */
+#ifdef SIGWINCH
+#ifndef CANNOT_DUMP
+  if (initialized)
+#endif /* CANNOT_DUMP */
+    signal (SIGWINCH, window_change_signal);
+#endif /* SIGWINCH */
+
   /* If the user wants to use a window system, we shouldn't bother
      initializing the terminal.  This is especially important when the
      terminal is so dumb that emacs gives up before and doesn't bother
@@ -6766,13 +6776,6 @@ For types not defined in VMS, use  define emacs_term \"TYPE\".\n\
   adjust_frame_glyphs_initially ();
   calculate_costs (XFRAME (selected_frame));
 
-#ifdef SIGWINCH
-#ifndef CANNOT_DUMP
-  if (initialized)
-#endif /* CANNOT_DUMP */
-    signal (SIGWINCH, window_change_signal);
-#endif /* SIGWINCH */
-
   /* Set up faces of the initial terminal frame of a dumped Emacs.  */
   if (initialized
       && !noninteractive