I've disabled the minimizing effect and, later on, all the other effects but the result is the same.
The only way I've found to handle the problem is enabling Effects > ExtendedBorders, but unfortunately it really slows down my app (I guess it's probably because my video card stinks).