Fix an issue where the window goes black during orientation
Smoother rotation