Making the threshold to activate switch-window customizable