This is a hypothetical question. I am wondering, can my desktop wallet be hacked if I log into an unsecured WiFi hotspot even if I do not log into my bitcoin desktop wallet? I am wondering because I travel a lot, and when travelling I sometimes log into coffee shop WiFi hotspots. I don't keep a lot of funds on the desktop but I'm wondering about this.
If you are using unsecred WiFi then yes they can hack your PC through man-in-the-middle attack (MITM) which can change your DNS and redirect you to malicious sites to get your credentials. They can also install malware or spyware to your computer. These way your computer can be hacked and you might loose your bitcoins too so avoid using public Wifi networks.