some code cleanup regarding ImmersiveMode