From 45c3e4301a60c6991a271ee0522c490c0df9a4dd Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 25 Jan 2024 12:17:54 +0800 Subject: [PATCH] Prevent matrices from remaining invalid post mini-window resize * src/androidfns.c (android_create_tip_frame): Enable building with GLYPH_DEBUG. * src/window.c (resize_mini_window_apply): Garbage the frame if F->redisplay is already set to indicate that redisplay_internal should nevertheless return to it. (cherry picked from commit caea0c1649d1df96b811c1388fde396e66bc356b) --- src/androidfns.c | 3 --- src/window.c | 12 +++++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/androidfns.c b/src/androidfns.c index bf8ab5b45cc..34f1f533684 100644 --- a/src/androidfns.c +++ b/src/androidfns.c @@ -1931,9 +1931,6 @@ android_create_tip_frame (struct android_display_info *dpyinfo, image_cache_refcount = FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0; -#ifdef GLYPH_DEBUG - dpyinfo_refcount = dpyinfo->reference_count; -#endif /* GLYPH_DEBUG */ gui_default_parameter (f, parms, Qfont_backend, Qnil, "fontBackend", "FontBackend", RES_TYPE_STRING); diff --git a/src/window.c b/src/window.c index 3a54f7ce7b1..915f591221d 100644 --- a/src/window.c +++ b/src/window.c @@ -5331,7 +5331,17 @@ resize_mini_window_apply (struct window *w, int delta) w->pixel_top = r->pixel_top + r->pixel_height; w->top_line = r->top_line + r->total_lines; - /* Enforce full redisplay of the frame. */ + /* Enforce full redisplay of the frame. If f->redisplay is already + set, which it generally is in the wake of a ConfigureNotify + (frame resize) event, merely setting f->redisplay is insufficient + for redisplay_internal to continue redisplaying the frame, as + redisplay_internal cannot distinguish between f->redisplay set + before it calls redisplay_window and that after, so garbage the + frame as well. */ + + if (f->redisplay) + SET_FRAME_GARBAGED (f); + /* FIXME: Shouldn't some of the caller do it? */ fset_redisplay (f); adjust_frame_glyphs (f); -- 2.39.5