fixed mainwin size
optimized 2d flips