Merge pull request #4394 from aldelaro5/fix-focus-detection-linux Fix window focus detection on Linux (rebase from #3843)