Block switch when a window is selected / stackoverflow must be resolved