From acc07f1a0301e4e797728c170e652290d0721927 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Mon, 11 May 2026 02:03:30 +0300 Subject: [PATCH] [GTK3] On Expose, repaint the border before the content * src/xterm.c (handle_one_xevent): Move the x_clear_under_internal_border call before expose_frame, for less chance of implicit flush to screen in between (bug#80662). --- src/xterm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index c021d06dd5d..1401693541c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -19931,14 +19931,14 @@ handle_one_xevent (struct x_display_info *dpyinfo, x_clear_area (f, event->xexpose.x, event->xexpose.y, event->xexpose.width, event->xexpose.height); + /* Paint the border before content (few operations, less + chance for a compositor sync in between). */ + x_clear_under_internal_border (f); #endif expose_frame (f, event->xexpose.x, event->xexpose.y, event->xexpose.width, event->xexpose.height); #ifndef USE_TOOLKIT_SCROLL_BARS x_scroll_bar_handle_exposure (f, (XEvent *) event); -#endif -#ifdef USE_GTK - x_clear_under_internal_border (f); #endif } #ifndef USE_TOOLKIT_SCROLL_BARS