I have a similar setup for my MBP + Windows Desktop. I ended up using a simple USB switcher for all the devices and just running two inputs and manually switching between screen inputs. One button press for USB switch, one source switch on monitor. If I need something from the other computer during the use, I just remote in.
You could use SimpleKVM to detect the USB change, and trigger the monitor input change.
https://github.com/fiddyschmitt/SimpleKVM