summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2023-05-13 10:07:22 +0800
committerPo Lu <luangruo@yahoo.com>2023-05-13 10:07:22 +0800
commitd9f674aea50cf1fe6ac138f14b602ce2d0f5cf77 (patch)
tree8659713f67db7d8bc13d38edc7d5241ce615a405 /src
parent3e132b972e30c5b0cb75ed29d8ca5a845434d6fe (diff)
downloademacs-d9f674aea50cf1fe6ac138f14b602ce2d0f5cf77.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/xterm.c b/src/xterm.c
index d621d94a2cf..0899fcdc2d6 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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