  Let $X$ be a compact K\"ahler manifold with vanishing Riemann curvature. We
prove that there exists a manifold $X'$, deformation equivalent to $X$, which
is not an analytification of any projective variety, if and only if $H^0(X,
\Omega^2) \neq 0$. Using this, we recover a recent theorem of Catanese and
Demleitner, which states that a rigid smooth quotient of a complex torus is
always projective. We also produce many examples of non-algebraic flat K\"ahler
manifolds with vanishing first Betti number.
