Improve focus handling when switching to fullscreen monitor.

Related to #859
1 job for master
Status Job ID Name Coverage
  Build
canceled #94173
linux kf5-qt5 qt5.15