aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Möllmann2024-11-05 10:25:22 +0100
committerGerd Möllmann2024-11-05 10:43:24 +0100
commit56708ea676e0fdfaeec36607333bb2955ec3b40e (patch)
treec504f153257a25f491d253c310174e5d7fa25924
parent33f1ab5034c7a5a9333ab6ead01f14a0f91c5f97 (diff)
downloademacs-56708ea676e0fdfaeec36607333bb2955ec3b40e.tar.gz
emacs-56708ea676e0fdfaeec36607333bb2955ec3b40e.zip
Don't copy non-enabled rows from child
* src/dispnew.c (copy_child_glyphs): Check if child row is enabled.
-rw-r--r--src/dispnew.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 2afd2cd3c5a..a7adbfb6f16 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -102,6 +102,20 @@ static void adjust_frame_glyphs_for_window_redisplay (struct frame *);
102static void adjust_frame_glyphs_for_frame_redisplay (struct frame *); 102static void adjust_frame_glyphs_for_frame_redisplay (struct frame *);
103static void set_window_update_flags (struct window *w, bool on_p); 103static void set_window_update_flags (struct window *w, bool on_p);
104 104
105#if 0 /* Please leave this in as a debugging aid. */
106static void
107check_rows (struct frame *f)
108{
109 for (int y = 0; y < f->desired_matrix->nrows; ++y)
110 if (MATRIX_ROW_ENABLED_P (f->desired_matrix, y))
111 {
112 struct glyph_row *row = MATRIX_ROW (f->desired_matrix, y);
113 for (int x = 0; x < row->used[TEXT_AREA]; ++x)
114 eassert (row->glyphs[TEXT_AREA][x].frame != 0);
115 }
116}
117#endif
118
105/* True means last display completed. False means it was preempted. */ 119/* True means last display completed. False means it was preempted. */
106 120
107bool display_completed; 121bool display_completed;
@@ -3702,10 +3716,12 @@ copy_child_glyphs (struct frame *root, struct frame *child)
3702 neutralize_wide_char (root, root_row, r.x + r.w); 3716 neutralize_wide_char (root, root_row, r.x + r.w);
3703 } 3717 }
3704 3718
3705 /* Copy what's visible from the child's current row. */ 3719 /* Copy what's visible from the child's current row. If that row
3720 is not enabled_p, we can't copy anything that makes sense. */
3706 struct glyph_row *child_row = MATRIX_ROW (child->current_matrix, child_y); 3721 struct glyph_row *child_row = MATRIX_ROW (child->current_matrix, child_y);
3707 memcpy (root_row->glyphs[0] + r.x, child_row->glyphs[0] + child_x, 3722 if (child_row->enabled_p)
3708 r.w * sizeof (struct glyph)); 3723 memcpy (root_row->glyphs[0] + r.x, child_row->glyphs[0] + child_x,
3724 r.w * sizeof (struct glyph));
3709 3725
3710 /* Compute a new hash since we changed glyphs. */ 3726 /* Compute a new hash since we changed glyphs. */
3711 root_row->hash = row_hash (root_row); 3727 root_row->hash = row_hash (root_row);