Fixed windows flickering when changing focus