comparison src/dispnew.c @ 10770:79745e047484

(change_frame_size_1): New subroutine. (change_frame_size): If f is termcap frame, change size of all of them. (remake_frame_glyphs): No longer static. Don't mark nonselected termcap frame as garbaged.
author Richard M. Stallman <rms@gnu.org>
date Fri, 17 Feb 1995 08:40:18 +0000
parents a553a08f5785
children cac0367b1794
comparison
equal deleted inserted replaced
10769:813b186e70d8 10770:79745e047484
69 #else /* not __GNU_LIBRARY__ */ 69 #else /* not __GNU_LIBRARY__ */
70 #ifndef PENDING_OUTPUT_COUNT 70 #ifndef PENDING_OUTPUT_COUNT
71 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base) 71 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)
72 #endif 72 #endif
73 #endif 73 #endif
74
75 static void change_frame_size_1 ();
74 76
75 /* Nonzero upon entry to redisplay means do not assume anything about 77 /* Nonzero upon entry to redisplay means do not assume anything about
76 current contents of actual terminal frame; clear and redraw it. */ 78 current contents of actual terminal frame; clear and redraw it. */
77 79
78 int frame_garbaged; 80 int frame_garbaged;
350 #endif 352 #endif
351 353
352 xfree (glyphs); 354 xfree (glyphs);
353 } 355 }
354 356
355 static void 357 void
356 remake_frame_glyphs (frame) 358 remake_frame_glyphs (frame)
357 FRAME_PTR frame; 359 FRAME_PTR frame;
358 { 360 {
359 if (FRAME_CURRENT_GLYPHS (frame)) 361 if (FRAME_CURRENT_GLYPHS (frame))
360 free_frame_glyphs (frame, FRAME_CURRENT_GLYPHS (frame)); 362 free_frame_glyphs (frame, FRAME_CURRENT_GLYPHS (frame));
383 = (char *) xmalloc (FRAME_WIDTH (frame) + 1); 385 = (char *) xmalloc (FRAME_WIDTH (frame) + 1);
384 386
385 FRAME_CURRENT_GLYPHS (frame) = make_frame_glyphs (frame, 0); 387 FRAME_CURRENT_GLYPHS (frame) = make_frame_glyphs (frame, 0);
386 FRAME_DESIRED_GLYPHS (frame) = make_frame_glyphs (frame, 0); 388 FRAME_DESIRED_GLYPHS (frame) = make_frame_glyphs (frame, 0);
387 FRAME_TEMP_GLYPHS (frame) = make_frame_glyphs (frame, 1); 389 FRAME_TEMP_GLYPHS (frame) = make_frame_glyphs (frame, 1);
388 SET_FRAME_GARBAGED (frame); 390 if (! FRAME_TERMCAP_P (frame) || frame == selected_frame)
391 SET_FRAME_GARBAGED (frame);
389 } 392 }
390 393
391 /* Return the hash code of contents of line VPOS in frame-matrix M. */ 394 /* Return the hash code of contents of line VPOS in frame-matrix M. */
392 395
393 static int 396 static int
2025 If DELAY is non-zero, then assume we're being called from a signal 2028 If DELAY is non-zero, then assume we're being called from a signal
2026 handler, and queue the change for later - perhaps the next 2029 handler, and queue the change for later - perhaps the next
2027 redisplay. Since this tries to resize windows, we can't call it 2030 redisplay. Since this tries to resize windows, we can't call it
2028 from a signal handler. */ 2031 from a signal handler. */
2029 2032
2030 change_frame_size (frame, newheight, newwidth, pretend, delay) 2033 change_frame_size (f, newheight, newwidth, pretend, delay)
2034 register FRAME_PTR f;
2035 int newheight, newwidth, pretend;
2036 {
2037 Lisp_Object tail, frame;
2038 if (FRAME_TERMCAP_P (f))
2039 {
2040 /* When using termcap, all frames use the same screen,
2041 so a change in size affects all termcap frames. */
2042 FOR_EACH_FRAME (tail, frame)
2043 if (FRAME_TERMCAP_P (XFRAME (frame)))
2044 change_frame_size_1 (XFRAME (frame), newheight, newwidth,
2045 pretend, delay);
2046 }
2047 else
2048 change_frame_size_1 (f, newheight, newwidth, pretend, delay);
2049 }
2050
2051 static void
2052 change_frame_size_1 (frame, newheight, newwidth, pretend, delay)
2031 register FRAME_PTR frame; 2053 register FRAME_PTR frame;
2032 int newheight, newwidth, pretend; 2054 int newheight, newwidth, pretend;
2033 { 2055 {
2034 /* If we can't deal with the change now, queue it for later. */ 2056 /* If we can't deal with the change now, queue it for later. */
2035 if (delay) 2057 if (delay)