diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2023-04-21 10:58:19 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2023-04-29 11:51:32 +0200 |
commit | 24302315fb8f46be141a9eda60e8d107c84a948d (patch) | |
tree | d6a67992a9909a32be20f06944978b856e2e82ff /gdk | |
parent | 248d13d8dc0eb094170c5674e92d29819bd7dad5 (diff) | |
download | gtk+-24302315fb8f46be141a9eda60e8d107c84a948d.tar.gz |
gdk/x11: Invalidate whole surface after size change
The Expose events following a ConfigureNotify may arrive at
a time that we did not resize the surface yet, making these
expose events a no-op. Even though gsk/gtk take care of the
window content itself, this might lead to unrendered portions
of the window shadow.
This may be seen with GSK_RENDERER=cairo and GDK_BACKEND=x11,
attempting to tile a window (e.g. gtk4-demo) left or right.
The window will show black rectangles or other artifacts in
the window shadow areas that correspond to the newly painted
portions (as the window needs to expand vertically).
In order to fix this with a similar behavior to Wayland,
consider ourselves the whole surface invalidated after resize,
in order to ensure everything is painted from scratch.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/x11/gdksurface-x11.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index 284895ce0e..7a1bb4e8b9 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -209,6 +209,8 @@ gdk_x11_surface_update_size (GdkX11Surface *self, cairo_surface_set_device_scale (self->cairo_surface, scale, scale); } + gdk_surface_invalidate_rect (surface, NULL); + return TRUE; } |