Check window visibility when switching desktops.