Workaround for Qt bug where toggling the ToC, or opening a dialog would unregister for touch events