Activate window when setting visible
Ignore requestActivateWindow when window is invisible.
I don't know whether this change reflects the Qt API correctly. But it was needed for telegram-desktop to react to touch events. Further in eacc3726 there was a fix regarding popups, I'm not sure if my change is still needed with that. I originally created my changes on 35659a55.