The focus is now restored correctly when releasing alt+tab without actually switching applications in some configurations.
We map switchEnd and some other events to the desktop window because the original window is invalid, so eventHandler.shouldAcceptEvent had to be taught this.
Re #3897.