As Uebergame accidentally proved, it is possible to have a foreground window that is not visible, in which case our current heuristics won't replace that window when handling keyboard enter event. Add heuristic to take this into account.
As Uebergame accidentally proved, it is possible to have a foreground window that is not visible, in which case our current heuristics won't replace that window when handling keyboard enter event. Add heuristic to take this into account.