Fix to new windows don't become active, messing with the interaction of the main window.