comparison src/dispnew.c @ 2252:9793d8654e23

* frame.h (FOR_EACH_FRAME): Change the definition so that FRAME_VAR is a lisp object. * dispnew.c (WINDOW_CHANGE_SIGNAL, do_pending_window_change): Adjusted appropriately. * xdisp.c (redisplay): Adjusted appropriately. * dispnew.c (Fredraw_frame): Give this appropriate definitions for MULTI_FRAME and non-MULTI_FRAME configurations. (Fredraw_display): Give this a non-MULTI_FRAME-dependent definition.
author Jim Blandy <jimb@redhat.com>
date Thu, 18 Mar 1993 22:50:00 +0000
parents 8d7841ea526f
children c6f3343edee1
comparison
equal deleted inserted replaced
2251:216f86e5891d 2252:9793d8654e23
163 mark_window_display_accurate (FRAME_ROOT_WINDOW (f), 0); 163 mark_window_display_accurate (FRAME_ROOT_WINDOW (f), 0);
164 f->garbaged = 0; 164 f->garbaged = 0;
165 return Qnil; 165 return Qnil;
166 } 166 }
167 167
168 DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "",
169 "Clear and redisplay all visible frames.")
170 ()
171 {
172 Lisp_Object frame, tail;
173
174 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
175 {
176 frame = XCONS (tail)->car;
177
178 /* If we simply redrew all visible frames, whether or not they
179 were garbaged, then this would make all frames clear and
180 redraw whenever a new frame is created or an existing frame
181 is de-iconified; those events set the global frame_garbaged
182 flag, to which redisplay responds by calling this function.
183
184 This used to redraw all visible frames; the only advantage of
185 that approach is that if a frame changes from invisible to
186 visible without setting its garbaged flag, it still gets
187 redisplayed. But that should never happen; since invisible
188 frames are not updated, they should always be marked as
189 garbaged when they become visible again. If that doesn't
190 happen, it's a bug in the visibility code, not a bug here. */
191 if (FRAME_VISIBLE_P (XFRAME (frame))
192 && FRAME_GARBAGED_P (XFRAME (frame)))
193 Fredraw_frame (frame);
194 }
195 return Qnil;
196 }
197
198 redraw_frame (f) 168 redraw_frame (f)
199 FRAME_PTR f; 169 FRAME_PTR f;
200 { 170 {
201 Lisp_Object frame; 171 Lisp_Object frame;
202 XSET (frame, Lisp_Frame, f); 172 XSET (frame, Lisp_Frame, f);
203 Fredraw_frame (frame); 173 Fredraw_frame (frame);
204 } 174 }
205 175
206 #else /* not MULTI_FRAME */ 176 #else
207 177
208 DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "", 178 DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, "",
209 "Clear screen and output again what is supposed to appear on it.") 179 "Clear frame FRAME and output again what is supposed to appear on it.")
210 () 180 (frame)
181 Lisp_Object frame;
211 { 182 {
212 update_begin (0); 183 update_begin (0);
213 set_terminal_modes (); 184 set_terminal_modes ();
214 clear_frame (); 185 clear_frame ();
215 update_end (0); 186 update_end (0);
220 so that every window will have its redisplay done. */ 191 so that every window will have its redisplay done. */
221 mark_window_display_accurate (FRAME_ROOT_WINDOW (0), 0); 192 mark_window_display_accurate (FRAME_ROOT_WINDOW (0), 0);
222 return Qnil; 193 return Qnil;
223 } 194 }
224 195
225 #endif /* not MULTI_FRAME */ 196 #endif
197
198 DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "",
199 "Clear and redisplay all visible frames.")
200 ()
201 {
202 Lisp_Object tail, frame;
203
204 FOR_EACH_FRAME (tail, frame)
205 /* If we simply redrew all visible frames, whether or not they
206 were garbaged, then this would make all frames clear and
207 nredraw whenever a new frame is created or an existing frame
208 is de-iconified; those events set the global frame_garbaged
209 flag, to which redisplay responds by calling this function.
210
211 This used to redraw all visible frames; the only advantage of
212 that approach is that if a frame changes from invisible to
213 visible without setting its garbaged flag, it still gets
214 redisplayed. But that should never happen; since invisible
215 frames are not updated, they should always be marked as
216 garbaged when they become visible again. If that doesn't
217 happen, it's a bug in the visibility code, not a bug here. */
218 if (FRAME_VISIBLE_P (XFRAME (frame))
219 && FRAME_GARBAGED_P (XFRAME (frame)))
220 Fredraw_frame (frame);
221
222 return Qnil;
223 }
224
226 225
227 static struct frame_glyphs * 226 static struct frame_glyphs *
228 make_frame_glyphs (frame, empty) 227 make_frame_glyphs (frame, empty)
229 register FRAME_PTR frame; 228 register FRAME_PTR frame;
230 int empty; 229 int empty;
1603 FILE * specified in the frame structure). Record the new size, 1602 FILE * specified in the frame structure). Record the new size,
1604 but don't reallocate the data structures now. Let that be done 1603 but don't reallocate the data structures now. Let that be done
1605 later outside of the signal handler. */ 1604 later outside of the signal handler. */
1606 1605
1607 { 1606 {
1608 Lisp_Object tail; 1607 Lisp_Object tail, frame;
1609 FRAME_PTR f; 1608
1610 1609 FOR_EACH_FRAME (tail, frame)
1611 FOR_EACH_FRAME (tail, f)
1612 { 1610 {
1613 if (FRAME_TERMCAP_P (f)) 1611 if (FRAME_TERMCAP_P (XFRAME (frame)))
1614 { 1612 {
1615 change_frame_size (f, height, width, 0, 1); 1613 change_frame_size (XFRAME (frame), height, width, 0, 1);
1616 break; 1614 break;
1617 } 1615 }
1618 } 1616 }
1619 } 1617 }
1620 1618
1629 do_pending_window_change () 1627 do_pending_window_change ()
1630 { 1628 {
1631 /* If window_change_signal should have run before, run it now. */ 1629 /* If window_change_signal should have run before, run it now. */
1632 while (delayed_size_change) 1630 while (delayed_size_change)
1633 { 1631 {
1634 Lisp_Object tail; 1632 Lisp_Object tail, frame;
1635 FRAME_PTR f;
1636 1633
1637 delayed_size_change = 0; 1634 delayed_size_change = 0;
1638 1635
1639 FOR_EACH_FRAME (tail, f) 1636 FOR_EACH_FRAME (tail, frame)
1640 { 1637 {
1638 FRAME_PTR f = XFRAME (frame);
1639
1641 int height = FRAME_NEW_HEIGHT (f); 1640 int height = FRAME_NEW_HEIGHT (f);
1642 int width = FRAME_NEW_WIDTH (f); 1641 int width = FRAME_NEW_WIDTH (f);
1643 1642
1644 FRAME_NEW_HEIGHT (f) = 0; 1643 FRAME_NEW_HEIGHT (f) = 0;
1645 FRAME_NEW_WIDTH (f) = 0; 1644 FRAME_NEW_WIDTH (f) = 0;