toolbar toggles: improve isPopup() calculation