Fix opaque region specification on no-toolkit builds

* src/xterm.c (handle_one_xevent): Always specify opaque region
on no-toolkit builds upon a configure event for any's window.
This commit is contained in:
Po Lu 2023-05-13 10:07:22 +08:00
parent 3e132b972e
commit d9f674aea5

View file

@ -21178,14 +21178,28 @@ handle_one_xevent (struct x_display_info *dpyinfo,
x_cr_update_surface_desired_size (any,
configureEvent.xconfigure.width,
configureEvent.xconfigure.height);
if (f || (any && configureEvent.xconfigure.window == FRAME_X_WINDOW (any)))
x_update_opaque_region (f ? f : any, &configureEvent);
#endif
#if !defined USE_X_TOOLKIT && !defined USE_GTK
/* Make the new size of the frame its opaque region. This is a
region describing areas of the window which are always
guaranteed to be completely opaque and can be treated as such
by the compositor. It is set to the width and height of the
only window in no-toolkit builds when `alpha_background' is
not set, and is cleared otherwise. */
if (f || (any && configureEvent.xconfigure.window
== FRAME_OUTER_WINDOW (any)))
x_update_opaque_region (f ? f : any, &configureEvent);
#endif /* !defined USE_X_TOOLKIT && !defined USE_GTK */
#ifdef USE_GTK
if (!f
&& (f = any)
&& configureEvent.xconfigure.window == FRAME_X_WINDOW (f)
&& (FRAME_VISIBLE_P(f)
&& (FRAME_VISIBLE_P (f)
|| !(configureEvent.xconfigure.width <= 1
&& configureEvent.xconfigure.height <= 1)))
{
@ -21212,10 +21226,9 @@ handle_one_xevent (struct x_display_info *dpyinfo,
f = 0;
}
#endif
if (f
&& (FRAME_VISIBLE_P(f)
|| !(configureEvent.xconfigure.width <= 1
&& configureEvent.xconfigure.height <= 1)))
if (f && (FRAME_VISIBLE_P (f)
|| !(configureEvent.xconfigure.width <= 1
&& configureEvent.xconfigure.height <= 1)))
{
#ifdef USE_GTK
/* For GTK+ don't call x_net_wm_state for the scroll bar