Skip to content

gdk/x11: Invalidate whole surface after size change

Carlos Garnacho requested to merge carlosg/gtk:wip/carlosg/x11-artifacts into main

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.

Edited by Carlos Garnacho

Merge request reports