diff options
| author | Po Lu | 2023-05-13 10:07:22 +0800 |
|---|---|---|
| committer | Po Lu | 2023-05-13 10:07:22 +0800 |
| commit | d9f674aea50cf1fe6ac138f14b602ce2d0f5cf77 (patch) | |
| tree | 8659713f67db7d8bc13d38edc7d5241ce615a405 /src | |
| parent | 3e132b972e30c5b0cb75ed29d8ca5a845434d6fe (diff) | |
| download | emacs-d9f674aea50cf1fe6ac138f14b602ce2d0f5cf77.tar.gz emacs-d9f674aea50cf1fe6ac138f14b602ce2d0f5cf77.zip | |
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.c | 27 |
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, | |||
| 21178 | x_cr_update_surface_desired_size (any, | 21178 | x_cr_update_surface_desired_size (any, |
| 21179 | configureEvent.xconfigure.width, | 21179 | configureEvent.xconfigure.width, |
| 21180 | configureEvent.xconfigure.height); | 21180 | configureEvent.xconfigure.height); |
| 21181 | if (f || (any && configureEvent.xconfigure.window == FRAME_X_WINDOW (any))) | ||
| 21182 | x_update_opaque_region (f ? f : any, &configureEvent); | ||
| 21183 | #endif | 21181 | #endif |
| 21182 | |||
| 21183 | #if !defined USE_X_TOOLKIT && !defined USE_GTK | ||
| 21184 | |||
| 21185 | /* Make the new size of the frame its opaque region. This is a | ||
| 21186 | region describing areas of the window which are always | ||
| 21187 | guaranteed to be completely opaque and can be treated as such | ||
| 21188 | by the compositor. It is set to the width and height of the | ||
| 21189 | only window in no-toolkit builds when `alpha_background' is | ||
| 21190 | not set, and is cleared otherwise. */ | ||
| 21191 | |||
| 21192 | if (f || (any && configureEvent.xconfigure.window | ||
| 21193 | == FRAME_OUTER_WINDOW (any))) | ||
| 21194 | x_update_opaque_region (f ? f : any, &configureEvent); | ||
| 21195 | |||
| 21196 | #endif /* !defined USE_X_TOOLKIT && !defined USE_GTK */ | ||
| 21197 | |||
| 21184 | #ifdef USE_GTK | 21198 | #ifdef USE_GTK |
| 21185 | if (!f | 21199 | if (!f |
| 21186 | && (f = any) | 21200 | && (f = any) |
| 21187 | && configureEvent.xconfigure.window == FRAME_X_WINDOW (f) | 21201 | && configureEvent.xconfigure.window == FRAME_X_WINDOW (f) |
| 21188 | && (FRAME_VISIBLE_P(f) | 21202 | && (FRAME_VISIBLE_P (f) |
| 21189 | || !(configureEvent.xconfigure.width <= 1 | 21203 | || !(configureEvent.xconfigure.width <= 1 |
| 21190 | && configureEvent.xconfigure.height <= 1))) | 21204 | && configureEvent.xconfigure.height <= 1))) |
| 21191 | { | 21205 | { |
| @@ -21212,10 +21226,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 21212 | f = 0; | 21226 | f = 0; |
| 21213 | } | 21227 | } |
| 21214 | #endif | 21228 | #endif |
| 21215 | if (f | 21229 | if (f && (FRAME_VISIBLE_P (f) |
| 21216 | && (FRAME_VISIBLE_P(f) | 21230 | || !(configureEvent.xconfigure.width <= 1 |
| 21217 | || !(configureEvent.xconfigure.width <= 1 | 21231 | && configureEvent.xconfigure.height <= 1))) |
| 21218 | && configureEvent.xconfigure.height <= 1))) | ||
| 21219 | { | 21232 | { |
| 21220 | #ifdef USE_GTK | 21233 | #ifdef USE_GTK |
| 21221 | /* For GTK+ don't call x_net_wm_state for the scroll bar | 21234 | /* For GTK+ don't call x_net_wm_state for the scroll bar |