Rémi Bernon (@rbernon) commented about dlls/win32u/window.c:
if (surface) window_surface_release( surface );
return TRUE;
}
window_surface_lock( surface ); if (!rect) add_bounds_rect( &surface->bounds, &surface->rect ); else {
RECT dirty = window_rect;
OffsetRect( &dirty, rects.client.left - rects.visible.left, rects.client.top - rects.visible.top );
if (!(region = expose_window_surface_rect( surface, flags, dirty ))) flags = 0;
else NtGdiOffsetRgn( region, rects.client.left - rects.visible.left, rects.client.top - rects.visible.top );
OffsetRect( &window_rect, rects.client.left - rects.visible.left, rects.client.top - rects.visible.top );
intersect_rect( &window_rect, &window_rect, &surface->rect );
}add_bounds_rect( &surface->bounds, &window_rect );
This now redraws the entire window / marks as dirty and flushes the entire surface on every Expose event, I think we should respect the exposed rect. Or drop rect altogether if that's really the intent, but it seems wasteful.