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