void
cmcheckmagic (struct tty_display_info *tty)
{
+ /* If we have unhandled SIGWINCH, we don't really know what are our
+ up-to-date frame diumensions. */
+ if (frame_size_change_delayed ())
+ return;
if (curX (tty) == FrameCols (tty))
{
if (!MagicWrap (tty) || curY (tty) >= FrameRows (tty) - 1)
#endif
void do_pending_window_change (bool);
void change_frame_size (struct frame *, int, int, bool, bool, bool);
+extern bool frame_size_change_delayed (void);
void init_display (void);
void syms_of_display (void);
extern void spec_glyph_lookup_face (struct window *, GLYPH *);
#ifdef GLYPH_DEBUG
/* Window row window_y must be a slice of frame row
frame_y. */
- eassert (glyph_row_slice_p (window_row, frame_row));
+ eassert (delayed_size_change
+ || glyph_row_slice_p (window_row, frame_row));
/* If rows are in sync, we don't have to copy glyphs because
frame and window share glyphs. */
eassert (!FRAME_WINDOW_P (XFRAME (w->frame)));
eassert (vpos >= 0 && vpos <= w->desired_matrix->nrows);
vpos += WINDOW_TOP_EDGE_LINE (w);
- eassert (vpos >= 0 && vpos <= FRAME_TOTAL_LINES (XFRAME (w->frame)));
+ eassert (delayed_size_change
+ || (vpos >= 0 && vpos <= FRAME_TOTAL_LINES (XFRAME (w->frame))));
return vpos;
}
else
change_frame_size_1 (f, new_width, new_height, pretend, delay, safe);
}
+
+/* Return non-zero if we delayed size-changes and haven't handled them
+ yet, which means we cannot be sure about the exact dimensions of our
+ frames. */
+bool
+frame_size_change_delayed (void)
+{
+ return delayed_size_change;
+}
\f
/***********************************************************************
Terminal Related Lisp Functions