It's a typical EDID feeding issue with your KVM switch.
Windows 7 system requires checking the status of connected display all the time via the DDC-EDD channel from your connected display (no matter you connected it directly or via KVM switch). If your KVM switch did not support "full-time active EDID " feedback, the Windows 7 will "think" the display had been disconnected while you switched away/changed your target systems via KVM switch.
Solutions:
1) add "EDID emulator" put between the connected Win 7 system video output and the existing KVM switch.
2) Simply change the KVM switch which support "full-time active DDC EDID".