1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Properly invalidate XRender surfaces when only EmacsFrame is resized

* src/xterm.c (handle_one_xevent): Drop XRender surfaces when
the frame widget is resized, rather than when the toplevel is.
(bug#77988)
This commit is contained in:
Po Lu 2025-06-28 22:14:35 +08:00
parent acefe3bb12
commit 987cd7012d

View file

@ -21495,6 +21495,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
}
#endif
/* XXX: it is strictly only necessary to provide the edit window
to many of the statements below which only modify or invalidate
resources assigned there. Most conditionals that alternate
between `f' and `any' could ideally be removed. */
f = x_top_window_to_frame (dpyinfo, configureEvent.xconfigure.window);
/* This means we can no longer be certain of the root window
@ -21508,8 +21512,16 @@ handle_one_xevent (struct x_display_info *dpyinfo,
for size changes: that's not sufficient. We miss some
surface invalidations and flicker. */
#ifdef HAVE_XDBE
{
#if defined USE_GTK || defined USE_X_TOOLKIT
/* Only modifications to the edit window (on which pictures are
created) must be accompanied by invalidations. (bug#77988) */
struct frame *f
= x_window_to_frame (dpyinfo, configureEvent.xconfigure.window);
#endif /* USE_GTK || USE_X_TOOLKIT */
if (f && FRAME_X_DOUBLE_BUFFERED_P (f))
x_drop_xrender_surfaces (f);
}
#endif
#if defined USE_CAIRO && !defined USE_GTK
if (f)